Create a Backup

Note

  • On a multi-node system, to reduce the system load on the primary database node, backups are processed by the available secondary unified node with the highest database priority, i.e. the secondary node that is not for example in a recovery state. (To check priorities: database config.)

    Only if no secondary unified node is available or on a standalone single-node cluster system, is the backup processed on the primary unified node.

  • For best performance, it is recommended that remote backups be sent to a SFTP server at the same data center as the node processing the backup.

Important

Backups should be created and restored in a screen session - see: Using the screen command.

Backups can be created using backup create <location-name>, for example:

backup create localbackup or backup create myserverbackup.

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 available secondary unified node with the highest database priority contains data, in a failover scenario, the new secondary unified node with the highest database priority 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.