|GalaxyDICOM full recovery from BD media
1) Install the system with Factory install and license.
2) CRITICAL: unmount pacs_nearline set (be sure that it is unmounted or the script will work not different properly). The pacs_nearline integral volume should present, but not mounted. At this point the Customer’s media can be imported into the ADA drive.
Ftp the new sdfcmd file to “/opt/QStar/sdf/etc/sdfcmd” overwriting the old file.
3) Run the command "swapoff /mnt/postgresql/SWAP" - it will unmount additional swap that is used for the DICOM.
4) Stop the QStar servers
5) Stop the Postgres data base “/etc/init.d/postgresql-8.4 stop”
6) Now umount all raid partitions and remove them. To know where the raid is located use the "mount" command and check for /dev/sdX the output shows:
/dev/sda1 on /boot type ext3 (rw)
/dev/sdb1 on /media/v1 type xfs (rw)
/dev/sdb3 on /mnt/pacs_online type xfs (rw)
/dev/sdb2 on /mnt/postgresql type xfs (rw)
The RAID should be "/dev/sdb", and the partitions that are mounted are /dev/sdb1, /dev/sdb2, /dev/sdb3.
Ensure that the RAID is identified correctly. You can also check using "cat /proc/partitions" to find biggest disk, this will be the RAID.
8 0 3931704 sda
8 1 146484 sda1
8 2 3271484 sda2
8 3 513735 sda3
8 16 976683008 sdb
8 17 292968750 sdb1
8 18 146484375 sdb2
8 19 491974609 sdb3
Run the following commands to unmount the partitions:
Once the partitions have been unmounted run the following commands to remove the partitions:
"parted /dev/sdb rm 3"
"parted /dev/sdb rm 2"
"parted /dev/sdb rm 1"
7) Once the partitions have been removed run the following command:
During the execution of the script it will ask you to insert the BD-RE media with last backup into ADA drive (if it was not already imported). It is likely that you will get "Volume import failed, To Continue?" - confirm it with "y" and press Enter.
Then it will prompt that the recovery process needs to be performed and all data from database will be erased. It will ask "Are you sure?", confirm with "y" and press Enter.
The Simulated Jukebox and Integral Volume set will be recreated; data will be copied from the real media to simulated media (this will take time). If the media is full the copy will take about 2 hours, then mounting the set takes ~10 minutes. Then it will assemble list of available backups, please select latest by checking the date (for me it was last in the list). Restoring the database also takes several minutes.
Then it prompts for the "cleanup procedure". Confirmed it with "Y" and Enter. There maybe some minor errors.
8) The last step is to run the following script to restore the data to the online_cache.
Using vi edit the file and run the script:
Cd to the following directory and open the the file with vi:
Using vi change the parameter from '1h' -> '1m' save the changes and quit.
Execute the script “sh IMAGEDELETION_ACTIVATE.sh”
You can momnitor what is happening buy viewing the server.log file:
9) Once all images are available and can be opened in the Study Management the recovery procedure is complete. To clean do the following:
Execute the script “sh IMAGEDELETION_DEACTIVATE.sh” to stop the Activate script.
Cd to the following directory and open the file with vi:
Using vi change the parameter from '1m' -> '1h' save the changes and quit.
//////////////////////Additional Useful Commands/////////////////////
sudo -u postgres psql -c "select * from files " pacsdb
ps -e |grep java
sudo -u postgres dropdb pacsdb
sudo -u postgres createdb pacsdb
/etc/init.d/sntrypacs.sh stop or start
ls -ltr /mnt/pacs_nearline/postgresqlBackups/
gunzip -v -c /mnt/pacs_nearline/ postgresqlBackups/pacsdb_2011_04_21_03_05.dmp.gz | sudo -u postgres psql pacsdb >/tmp/log