Closed cdupont closed 6 years ago
Crontab on the VM:
30 1 * * * sudo mongodump --out /mnt/S3/backups/mongobackups/`date +"%m-%d-%y"`
45 1 * * * sudo mysqldump -h 127.0.0.1 -u root -proot_password --all-databases > /mnt/S3/backups/mysqlbackups/`date +"%m-%d-%y"`
S3 storage was used following this tutorial: https://cloudkul.com/blog/mounting-s3-bucket-linux-ec2-instance/
I open this issue to discuss the backup/restore of the platform. There are 3 databases:
In this issue we'll take the example of copying all data from the online instance to a local instance of the platform. The goal is to create locally a replica of the online platform, with all users, sensors and assets.
First start Waziup locally:
Keycloak
mysqldump
can be used to backup keycloak.Restore the data:
Alternatively, it's possible to export all realms using keycloak command line:
At this stage you should be able to import users and realms in Keycloak. Open the admin console:
http://localhost:8080/auth/
and add the export files in the import menu.Mongo
This command archives the remote mongo database:
This command restores it in the local instance:
Elasticsearch
Dump the database from remote:
Insert the data locally: