LDAP and Postgres/DB backup and restore

204 views
Skip to first unread message

nutun

unread,
Nov 5, 2019, 5:52:49 AM11/5/19
to dcm4che

Hi,

I have two dcm4chee servers i.e PACS-01 and PACS-02.

-> PACS-01 has dcm4chee-arc-5.15.1-secure dockerized installation through docker compose.

-> PACS-02 has dcm4chee-arc-5.15.1-secure dockerized installation through docker command line.

Both servers having some data archived. Now my plan is to upgrade both server to dcm4chee-arc-psql-5.19.0-secure.
PACS-01 will be upgraded through docker compose installation while PACS-02 will be upgraded through docker command line installation.

Now as per my understanding I have planned the following:

I will take LDAP backup through command {docker exec "lapd-container-id" export-data > ldap_backup`date +%d-%m-%Y"_"%H_%M_%S`.ldif} which can be restored through Apache Directory Studio.

Next turn is to backup PostgreSQL database of both servers and then restore in new versions so I can access/view my data in new versions.

I want to know the backup and restore commands for both docker compose and docker command line installation. And how can I restore LDAP backup through restore command for both docker compose and docker command line installation.

Also suggest me that am I going on right way/pattern?

Shehzad Hamid

unread,
Nov 8, 2019, 1:30:56 PM11/8/19
to dcm...@googlegroups.com
hi Nutun,

a lot of ways it can be achieved a sample example below, docker compose/docker command line? you mean which ever way a container is created by the two methods right?



ldap backup export

docker ps -a
(find the container id for ldap)
docker exec lapd-container-id export-data > config_backup`date +%d-%m-%Y"_"%H_%M_%S`.ldif

Or use Apache DS 2.0.0 for export/import



postgres db dump

docker ps -a
(find the container id for db)
docker exec db-container-id pg_dump -U pacs pacsdb > dbexport`date +%d-%m-%Y"_"%H_%M_%S`.pgsql

postgres db recreate/import/restore etc
  1. Create user with permission to create databases:

     > sudo -u postgres createuser -U postgres -P -d <user-name>
     Enter password for new role: <user-password>
     Enter it again: <user-password>
    
  2. Create database:

     > createdb -h localhost -U <user-name> <database-name>
    
  3. Create tables and indexes:

     > psql -h localhost <database-name> <user-name> < dump.sql

Or use pgAdmin for dump/restore etc

rgds


--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/7c34def2-b135-4350-b184-40952fe8961c%40googlegroups.com.


--
Regards,
Shehzad
----
"My name is Legion, for we are many"

nutun

unread,
Nov 14, 2019, 6:05:55 AM11/14/19
to dcm4che
Thank you for your response.

I have followed the following. ldap backup and restore is successful.
DB backup is successful but did not succeeded in DB restore.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm...@googlegroups.com.

chris bashall

unread,
Nov 15, 2019, 9:16:52 PM11/15/19
to dcm4che
could you use postgres master/ slave replication  for this ?
Reply all
Reply to author
Forward
0 new messages