Backing up using the CLI

As an alternative to performing application backup from the Control Center browser interface, you can use the command-line interface (CLI).

Using the CLI, you can back up your entire system or specify one or more tenant volumes to exclude from the backup. For example, to save resources, you might exclude the tenant volume that contains performance data, hbase-master. If you want to create a backup to restore on another system, you might exclude the tenant volumes for the events database and index, mariadb-events and zeneventserver.

Before starting a backup, Control Center estimates the size of the backup file and compares it to the amount of free space. If storage space is insufficient, Control Center does not start a backup. Exit code 1 indicates insufficient space. If storage space is insufficient, take action to increase available space, and then try the backup again.

The default directory for backup files is /opt/serviced/var/backups. The directory can be changed by specifying the SERVICED_BACKUPS_PATH environment variable in the Control Center configuration file, /etc/default/serviced.