BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

백업 구성

목적과 이점

Bahmni 시스템에는 환자 문서, 환자 이미지, DB 데이터 등 여러 아티팩트가 있습니다. 하드 드라이브 고장이나 사용자가 실수로 잘못된 SQL(예: delete SQL)을 실행하여 데이터가 손실될 수 있습니다. Bahmni는 모든 아티팩트를 백업하는 기능을 제공하므로 원치 않는 사고가 발생해도 백업에서 복구하여 최대한 빨리 정상 운영을 재개할 수 있습니다.

MySQL 데이터베이스 백업/복원 구성

도구 설치

MySQL 데이터베이스 백업에는 Xtrabackup 도구를 사용합니다. Bahmni 설치 중 이 도구를 설치할 수 있습니다. inventory 파일에 아래 구성을 추가하고 Bahmni 설치를 다시 실행합니다. inventory의 mysql-backup-tool 아래에 지정한 호스트에 도구가 설치됩니다.

Sample Inventory config
[mysql-backup-tool]
192.168.33.13

구성 가능한 매개변수

구성 가능한 일부 매개변수는 다음과 같습니다.

KeyDescriptionDefault Value
pathPath to backup the files. Backed up files are stored in this path./data/openmrs (for openmrs database)/data/reports (for bahmni_reports database)
restore_pathPath from where the restore files are picked up. In order to restore a file, it has to be present in this configured location/data/openmrs (for openmrs database)/data/reports (for bahmni_reports database)
retention_limitMaximum number of files maintained. Beyond this, the system automatically replaces the old files with the new backed up files.2
Sample Config for Openmrs
openmrs:
  path: /data/openmrs/
  retention_limit: 2
  restore_path: /data/openmrs/
Sample Config for Bahmni Reports
bahmni_reports:
  path: /data/reports/
  retention_limit: 2
  restore_path: /data/reports/

Postgres 데이터베이스 백업/복원 구성

도구 설치

Postgres 데이터베이스 백업에는 Pgbackrest 도구를 사용합니다. Bahmni 설치 중 이 도구를 설치할 수 있습니다. inventory 파일에 아래 구성을 추가하고 Bahmni 설치를 다시 실행합니다. inventory의 postgres-backup-tool 아래에 지정한 호스트에 도구가 설치됩니다.

Sample Inventory config
[postgres-backup-tool]
192.168.33.13

구성 가능한 매개변수

구성 가능한 일부 매개변수는 다음과 같습니다.

KeyDescriptionDefault Value
pathPath to backup the files as well as restore the files from. Backed up files are stored in this path. The file to be restored should be present in this location configured./var/lib/pgbackrest
retention_limitMaximum number of files maintained. Beyond this, the system automatically replaces the old files with the new backed up files.2
Sample Config
postgres:
  path: /var/lib/pgbackrest/
  retention_limit: 2

아티팩트 백업/복원 구성

inventory의 bahmni-backup-artifacts 아래에 지정한 호스트에서 백업을 수행합니다. 백업용 호스트는 하나만 지정할 수 있습니다.

Sample Inventory config
[bahmni-backup-artifacts]
192.168.33.13

구성 가능한 매개변수

구성 가능한 일부 매개변수는 다음과 같습니다.

KeyDescriptionDefault Value
async_timingrestore and backup can be done asynchronously.This timing is the maximum runtime for which the job will run in background.value has to be specified in seconds.86400
backup_to_pathpath to store the backedup artifacts/mymount
backup_from_pathpath from where backup has to be taken/home/bahmni/patient_images/home/bahmni/document_images/home/bahmni/uploaded-files/home/bahmni/uploaded_results/home/bahmni/pacs_images/home/bahmni/reports
restore_from_pathpath from where backup files that has to be restored will be taken/mymount
restore_to_pathpath to restore artifacts/home/bahmni/
retention_limitMaximum number of files maintained for each artifact. Beyond this, the system automatically replaces the old files with the new backed up files.2
Sample Config
patient_images:
     backup_to_path: /mymount
     backup_from_path: /home/bahmni/patient_images
     restore_from_path: /mymount
     restore_to_path: /home/bahmni/
     retention_limit: 2

수정된 문제:

여기에 언급된 아티팩트 관련 문제는 release-0.89에서 수정되었습니다.관련 문서: DB 백업 및 복원의 알려진 문제

Sample Config
all_artifacts:
   - name: patient_images
     backup_to_path: /mymount
     backup_from_path: /home/bahmni/patient_images
     restore_from_path: /mymount
     restore_to_path: /home/bahmni/
     retention_limit: 2
원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗