This article describes a way to create a backup, recover/transfer the main system data to another installation.
Data export
In order to export data from MongoDB to an archive on the current installation, the following command must be executed:
mongodump -d saymon -o mongodb_backup
Export configuration settings
It is necessary to make a copy of:
- the /etc/saymon directory, which contains server configuration files;
the client configuration file /usr/local/saymon/client/client-config.js.
In some cases the file client-config.js can be stored in another directory. The directory can be found by either checking the nginx configuration file or using the following command:
sudo find / -name "client-config.js"
Data import
In order to recover/import data to MongoDB on a new installation, the following command must be executed:
mongorestore --drop --noIndexRestore mongodb_backup echo flushall | redis-cli
Import configuration settings
In order to import configuration settings, it is necessary to paste:
- the files from the previously saved directory with configurations files into the directory /etc/saymon;
- the client configuration file into the directory /usr/local/saymon/client.