Create a Backup¶
Backups can be created using backup create <destination>, for example:
backup create localbackup or backup create myserverbackup <remote destination>.
An example of the console output is shown below:
platform@myhost:~$ backup create localbackup
... collecting data (step 1/3)
... preparing mongo data backup
... space available: 232 GB
... space required: 93 MB
... creating backup (step 2/3)
... verifying backup (step 3/3)
Backup was successfully created at localbackup:::\
058bccead2588a6f11f1dd86678bab68de48691d
WARNING: Backup maintenance of this location is not scheduled
schedule add localbackup -maintain backup clean localbackup keep 5
You have new mail in /var/mail/platform
platform@myhost:~$ backup list localbackup
localbackup:
URI: file:///backups
Backups:
2019-08-13 13:08
- Backups contain application data.
- Details of the backup can be seen in the log: log view platform/backup.log
Backups can be scheduled to run automatically - refer to the schedule command to automated backups.
For example:
- schedule add mybackups backup create myserverbackup
- schedule time mybackups 2 0
- schedule enable mybackups
The creation of scheduled backups of all nodes is therefore done for failover reasons. While only the primary node backup contains data, in a failover scenario, the new primary node will contain the backup data.
If a common network URI is used as backup destination across the cluster, each node’s backup will be uniquely identified by its UID in the remote backup directory.
Note
Off-site backups are recommended. In other words, export a local backup to a remote sftp server. Follow the process as described in the topic called Backup and Import to a New Environment.