USB 또는 외장 드라이브에 Bahmni 데이터 백업
수행 단계
- https://miguelmenendez.pro/en/articles/encrypt-usb-storage-device-linux-unified-key-setup-luks.html의 단계에 따라 USB/외장 드라이브를 암호화합니다. 암호는 비밀 장소에 기록하고 공유되거나 재사용된 암호, 추측하기 쉬운 암호를 사용하지 마십시오. 드라이브마다 한 번만 수행하는 작업입니다. USB를 분실하더라도 다른 사람이 데이터에 접근하기 매우 어렵다는 장점이 있습니다. 하드 드라이브를 /media/USB에 마운트합니다. mkdir 명령으로 USB에 디렉터리를 만듭니다. 암호를 사용하여 ‘cryptsetup luksOpen LUKS0001’ 명령으로 잠금을 해제합니다. ‘mount /dev/mapper/LUKS0001 /media/USB' 명령으로 하드 드라이브를 마운트합니다. 아래 단계에 따라 백업을 복사합니다(참고: rsync는 델타 업데이트/복사를 수행하는 명령줄 프로그램입니다): /media/USB/emr_backup/database/ 이미지 파일(환자 이미지, 문서 이미지, PACS 이미지, uploaded_results, uploaded-files)을 백업합니다. rsync -rh --progress -i --itemize-changes --update /home/bahmni/patient_images /media/USB/emr_backup/patient_images/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/document_images /media/USB/emr_backup/document_images/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded-files /media/USB/emr_backup/uploaded-files/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded_results /media/USB/emr_backup/uploaded_results/../ rsync -rh --progress -i --itemize-changes --update /var/lib/bahmni/dcm4chee-2.18.1-psql/server/default/archive /media/USB/emr_backup/pacs_images/archive/../ ‘umount /media/USB'로 디스크 마운트를 해제합니다. ‘cryptsetup luksClose LUKS0001'로 드라이브를 다시 잠급니다. 하드 드라이브를 분리하여 운영 환경에서 떨어진 안전한 장소에 보관합니다.
# Folder struture
emr_backup
|____ database
|____ patient_images
|____ document_images
|____ uploaded-files
|____ uploaded_results
|____ pacs_images
|____archive# Take database backup using the DB backup scripts for MySQL and PostGreSQL DBs
cd ~/bahmni-environment/scripts
./backup-mysql.sh password
./backup-psql.sh
cp /backup/<two newly created files> /media/USB/emr_backup/database/
# Backup image files - patient images, document images, pacs images, uploaded_results, uploaded-files (depending on what features of Bahmni you are using)
rsync -rh --progress -i --itemize-changes --update /home/bahmni/patient_images /media/USB/emr_backup/patient_images/../
rsync -rh --progress -i --itemize-changes --update /home/bahmni/document_images /media/USB/emr_backup/document_images/../
rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded-files /media/USB/emr_backup/uploaded-files/../
rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded_results /media/USB/emr_backup/uploaded_results/../
rsync -rh --progress -i --itemize-changes --update /var/lib/bahmni/dcm4chee-2.18.1-psql/server/default/archive /media/USB/emr_backup/pacs_images/archive/../원문 정보
원문 보기 ↗Bahmni Wiki · CC BY-SA 4.0