Automatic Backups

Viewed 10

How to configure automatic backup in KenyaEMR

1 Answers

The following guide provides a step-by-step on how to configure automatic backup in KenyaEMR;
Obtain the correct openmrs backup tool folder then open terminal and type the following;

  1. sudo cp -R openmrs-backup-tools/ /usr/share/
    
  2. cd /usr/share press enter
    
  3. sudo chown -R faciltyxx:facilityxx openmrs-backup-tools
    
  4. sudo chmod -R 755 openmrs-backup-tools
    
  5. sudo mkdir /var/backups/KenyaEMR/
    
  6. sudo chown -R facilityxx:facilityxx /var/backups/KenyaEMR/
    

Create a cron job to run the backup script on a daily basis by running crontab -e and select option 2. /bin/nano [ENTER]
Add the line:

  1. 00 11,16 * * * /usr/share/openmrs-backup-tools/openmrs_backup.sh
    

Then press Ctrl+x and press y and enter to save

Confirm by typing:

  1. cd /usr/share/openmrs-backup-tools [ENTER]
    

Then type

  1. ./openmrs_backup.sh and press enter.
    
Related Questions