백업 구성
목적과 이점
Bahmni 시스템에는 환자 문서, 환자 이미지, DB 데이터 등 여러 아티팩트가 있습니다. 하드 드라이브 고장이나 사용자가 실수로 잘못된 SQL(예: delete SQL)을 실행하여 데이터가 손실될 수 있습니다. Bahmni는 모든 아티팩트를 백업하는 기능을 제공하므로 원치 않는 사고가 발생해도 백업에서 복구하여 최대한 빨리 정상 운영을 재개할 수 있습니다.
MySQL 데이터베이스 백업/복원 구성
도구 설치
MySQL 데이터베이스 백업에는 Xtrabackup 도구를 사용합니다. Bahmni 설치 중 이 도구를 설치할 수 있습니다. inventory 파일에 아래 구성을 추가하고 Bahmni 설치를 다시 실행합니다. inventory의 mysql-backup-tool 아래에 지정한 호스트에 도구가 설치됩니다.
[mysql-backup-tool]
192.168.33.13구성 가능한 매개변수
구성 가능한 일부 매개변수는 다음과 같습니다.
| Key | Description | Default Value |
|---|---|---|
| path | Path to backup the files. Backed up files are stored in this path. | /data/openmrs (for openmrs database)/data/reports (for bahmni_reports database) |
| restore_path | Path 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_limit | Maximum number of files maintained. Beyond this, the system automatically replaces the old files with the new backed up files. | 2 |
openmrs:
path: /data/openmrs/
retention_limit: 2
restore_path: /data/openmrs/bahmni_reports:
path: /data/reports/
retention_limit: 2
restore_path: /data/reports/Postgres 데이터베이스 백업/복원 구성
도구 설치
Postgres 데이터베이스 백업에는 Pgbackrest 도구를 사용합니다. Bahmni 설치 중 이 도구를 설치할 수 있습니다. inventory 파일에 아래 구성을 추가하고 Bahmni 설치를 다시 실행합니다. inventory의 postgres-backup-tool 아래에 지정한 호스트에 도구가 설치됩니다.
[postgres-backup-tool]
192.168.33.13구성 가능한 매개변수
구성 가능한 일부 매개변수는 다음과 같습니다.
| Key | Description | Default Value |
|---|---|---|
| path | Path 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_limit | Maximum number of files maintained. Beyond this, the system automatically replaces the old files with the new backed up files. | 2 |
postgres:
path: /var/lib/pgbackrest/
retention_limit: 2아티팩트 백업/복원 구성
inventory의 bahmni-backup-artifacts 아래에 지정한 호스트에서 백업을 수행합니다. 백업용 호스트는 하나만 지정할 수 있습니다.
[bahmni-backup-artifacts]
192.168.33.13구성 가능한 매개변수
구성 가능한 일부 매개변수는 다음과 같습니다.
| Key | Description | Default Value |
|---|---|---|
| async_timing | restore 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_path | path to store the backedup artifacts | /mymount |
| backup_from_path | path 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_path | path from where backup files that has to be restored will be taken | /mymount |
| restore_to_path | path to restore artifacts | /home/bahmni/ |
| retention_limit | Maximum number of files maintained for each artifact. Beyond this, the system automatically replaces the old files with the new backed up files. | 2 |
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에서 수정되었습니다.
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: 2Bahmni Wiki · CC BY-SA 4.0