This documentation gives you an overview of how to backup Countly server, including database, important configuration files and directories.
In order to back up MongoDB database Countly uses, change directory into a directory where you want your backup files to reside, and run
mongodump --db countly mongodump --db countly_drill
Commands above will create dump directory with your database data in it.
You can restore it by changing into the same directory where your backup is, and by running:
mongorestore --db countly ./dump/countly mongorestore --db countly_drill ./dump/countly_drill
Now we need to backup files that keep settings. You would need to preserve this files basically if you modified them. If you haven't modified them and they are in their default, you do not have to backup those files as they come with all Countly installation.
Additionally you might want to backup some files that you usually add to countly, like:
frontend/express/public/appimages //uploaded app images frontend/express/public/userimages //uploaded user images frontend/express/certificates //push certificates
For general information about Countly command line utility, see this documentation
Backing up Countly via command line is easy - you just need to give the following commands:
countly backup /PATH/countly-backup
This wil backup all Countly MongoDB files together with all configuration files, user images, and certificates (if any).
When you install a new server, and you have old backup, this command will restore your old files on the new server:
countly restore /PATH/countly-backup
Any applications you have on the new server are kept, and apps which are backed up previously will show up with their corresponding data.