Running a backup

Choose File > Backup… to run a manual backup of your data. The backup will be carried out according to your configuration settings, described below.

While backup is run, all clients connected to the server will pause whatever they are doing until the backup is complete. So make sure you do it when users are not busy using mSupply. And make sure you configure your automatic backups to run at a time when the system is not busy e.g. lunch time, the end of work or, better, the middle of the night.

  • The location of the backup file is set in File > Preferences, Backup tab.
  • You can perform a backup manually and/or automatically. Automatic backups should be scheduled to run frequently (every day), manual backups should be done before updates or other potentially risky changes.
  • It is not necessary to quit the database before performing a backup.
  • Automatic backup settings are configured in the Preferences window - see General preferences, Backup tab for details.

The Backup function works both in single user as well as multi-user mode. Under multi-user mode, this command performs a backup of the server data on the server. A progress window will show how the backup is proceeding.

Note: In multi-user mode, you can't run the Restore function from the client. These must always be run from the server computer.

We recommend you set up your mSupply backups in the following manner

Disk configuration

Use RAID 1 or 5

  • RAID 1: two disks mirrored, so data is written to each disk
    • Advantages
      • if one disk fails you continue work from the other disk
      • if the RAID controller fails, you can directly connect one disk and continue work.
  • RAID 5: 3 or more disks, with one disk containing checksum information so that if any disk in the set fails, the set can be rebuilt.
    • Advantages:
      • The disk set can be easily expanded by adding disks if needed.
    • Disadvantages
      • You are reliant on the RAID controller, as disks can not be used without the controller. For critical data we recommend you have a spare RAID controller of exactly the same model you have installed in the server available.

Use a hot spare

This is a spare disk that the RAID controller will use if a disk in the RAID set fails.

Add another single disk to receive backup data

This disk is not part of the RAID

Backup your live data

Configure mSupply server to

  • use the single disk as it's backup location.
  • backup your data nightly.
  • use a log file. A log file (journal) records each database action as it happens. In the event of a power failure or other adverse event, all changes can be recovered from the log file.

Configure a secondary backup location in mSupply

mSupply can be configured to copy every Xth backup from the backup folder to another volume. The destination can be on the same machine, or elsewhere on the network. Refer Preferences > Backup 2 tab.

Configure off-site backup

Use Spideroak™ or Dropbox™ to backup your secondary location to their internet servers.

If needed configure an off-site computer to also synchronise with the backup service provider so you have an off-site copy as well as the “cloud” copy.

Mirrored servers

We have the technology to provide mirrored servers when very high availability is required. Contact us if interested. A charge will apply for implementation

Choosing this item allows you to choose a backup data file, uncompress it and start using it as your main data file.

  • Log in to msupply with an old data file or by creating a new data file and click menu File > Restore…
  • Locate your backup file in the Open dialog that appears. Your backup file has file extension .4BK, eg. mSupply.4BK. Hit OK.
  • Clicking on the small red down arrow next to the data file name will show the current destination location to where the data file will be restored. You are being prompted for a folder where the data file will be restored to. Change the destination location of the data file by clicking on the button. Once you are happy with the destination location, hit the Restore button.
  • After the file is restored, the file location is then displayed using your computer's default file manager. You can close this window.
  • Now go back into mSupply and click menu File > Open data file…
  • Locate the newly restored data file in the Open dialog that appears. Your data file has file extension .4dd, eg. mSupply.4dd.
  • Select the data file and hit the OK button.
  • You may be prompted for a log file. Click on the Create button. Select the suggested location, which is the same as your new data file location, and click on the Save button.
  • You will be prompted to do a backup. It is not necessary to do this at this stage. It will take a few moments to open this new data file, particularly if it is a large data file.
  • mSupply should open your restored data file and you should be presented with the log in screen to the new data file.

In client/server usage this command will have no effect.

Be very careful about restoring. We suggest you consult Sustainable Solutions before attempting a restore.

If you are using a synchronisation system with mSupply it's very important that you don't lose any data on the remote site. To ensure that power failures (or a dead battery on a laptop) don't cause mSupply to quit unexpectedly and therefore to lose data, you should configure mSupply to use a log file.

Use a standard place to store backups

We suggest that

  • You store your mSupply data in Documents/mSupply_data/
  • You store your backups in Documents/mSupply_backups/

Configure Backups

You can configure backups to run on a schedule that you set. To do this go to Admin > Preferences and select Backup from the left panel. You must have an existing backup to use these features (see running_a_backup).

Select Automatic Backup and schedule by hour(s), day(s) or week(s) as indicated.

Choose your backup folder and select Use log file. backup5.jpg

You will be prompted to specify the location of your log file.

Press Continue

When all settings are correct, press OK to save.

Previous: Field Descriptions Next: Changing users and Passwords

  • admin/backup_and_restore.txt
  • Last modified: 2018/05/16 03:15
  • by mark