ELMA365 On-Premises > Install ELMA365 to MicroK8s / Backup and restore data

Backup and restore data

Backup databases inside a cluster

начало внимание

When creating a backup copy, the elma365 services have to be stopped, and the application becomes unavailable.

конец внимание

To create a backup copy of all the databases use the following command:

elma365ctl dump

The dump will be saved to /backup with a time stamp.

If you want to backup only certain databases, run elma365ctl dump with the --parts= key, specifying the postgres, mongo, rabbitmq, s3 databases separated with a comma.

For example, if you want to backup only PostgreSQL and MongoDB here is the command that you need to run:

elma365ctl dump --parts=postgres,mongo

The dump with PostgreSQL and MongoDB databases will be saved to /backup with a time stamp.

Backup external databases

If you are using external databases, add the --consistent key to the database command; it will prepare the system for the backup:

elma365ctl dump  --consistent

The dump will be saved to /backup with a time stamp.

Restore from a database cluster

To restore all the databases, use the following command and specify the dump folder after the --path= key:

elma365ctl restore --path=/backup/<dump_folder>

The system will be available in just a few minutes after the command is completed.

If you want to restore data from specific databases, run elma365ctl restore with --parts= and --path= keys specifying the postgres, mongo, rabbitmq, s3 databases separated with a comma, and specifying the dump folder.

For example, to run backup only for PostgreSQL and MongoDB run:

elma365ctl restore --parts=postgres,mongo --path=/backup/<dump_folder>

The system will be available in just a few minutes after the command is completed.

Restore from external databases

When using external databases, first you have to stop the application services and prepare the system for recovery with the following command:

elma365ctl restore --prepare

Then recreate PostgreSQL and MongoDB. To learn more, see Install PostgreSQL and Install MongoDB.

Restore the data specifying the dump folder after the --path= key:

elma365ctl restore --path=/backup/<dump_folder>

The system will be available in just a few minutes after the command is completed.

Found a typo? Highlight the text, press ctrl + enter and notify us