Skip to main content

Backup and Restore Options

The user can perform backup and restore operation in the backend using tools option. The user can run the tools docker container using the docker-compose-TOOLS.yaml which is present inside the dashboard directory in the release setup and execute set of docker commands to perform backup, restore and patch operations. First the user has to navigate to the directory under dashboard which has docker-compose-TOOLS.yaml.

1. Backup

Then to perform backup of the MongoDB i.e. database(DB), user can run the below command.

docker-compose -f docker-compose-TOOLS.yaml up tools-backup

Once this command is run, if the backup operation is successful the backed up MongoDB file is placed inside STS folder which is present inside the dashboard directory.

2. Restore

Once the user has the backup file they can do the restore operation. The user can run the below command by specifying the backed up file name which is in .tar.gz. In the below command the backup file name is mongodb-megh-20230111-181527.tar.gz.

BACKUP_FILE=mongodb-megh-20230111-181527.tar.gz docker-compose -f docker-compose-TOOLS.yaml up tools-restore

This option restores the backed up file by cleaning up the existing state of the MongoDB.

3. Patch

This option performs the patch operation to the restored file. The patch operation will update the Database collection fields with new fields which are added in the latest releases. This operation will be required if user is upgrading from old to new releases, to update any new DB changes. The user can just run the following command.

docker-compose -f docker-compose-TOOLS.yaml up tools-patch

Migration

Things to note while migrating from old release(0.15.1) to latest 0.16 Megh Release.

note
  1. After there is a restore and patch operation, the Database contains site timezone defaulted to Europe/Dublin.

  2. After there is a restore and patch operation, the user should update the site timezone from Europe/Dublin to the required site timezone. Once this is done, the scheduled alert time (i.e. both start and end time) will be updated in accordance with the selected timezone and it will be activated and deactivated according to the set time of that timezone.

  3. After there is a restore and patch operation, the language will be defaulted to English.