System Backup and Restore

Backup and recovery protects against the loss of a the Anvil nodes. The Backup command takes a point in time backup of a metadata and system configuration. The Restore command restores with the metadata and configuration from a backup.

If recovering from a disaster, re-install the Anvil nodes with the same version used to take the backup and then use the restore command.

It is only supported to run Restore from freshly installed Anvil nodes. If restoring a system with Global File System shares, additional steps must be taken for recovery of those shares. Please contact support for assistance if that is the case.

System Backup and Restore does not back up actual user data.

Backups

To do a backup or restore operation, log in to the command line as an admin user. The backup-create command enables a backup to be scheduled or taken immediately.

A backup from an Anvil cluster is stored in a unique sub-directory under the specified path using the directory naming of anvil-<UUID>.

Several versions of the backups are automatically stored in the destination directory. The backup directory name is date-time to ensure they are unique.

Each backup is a full backup and is independent of the other backups. A total of 5 backups are stored in one location. When the number of backups exceeds 5, the system will periodically remove the oldest backup.

The following example provides the IP address of the storage node and the NFSv3 export path to back up to. The --now option takes the backup immediately.

# backup-create --ip 10.200.79.8 --path /bak/83 --now

success

Scheduled Backups

To create a schedule use the schedule-create command. The example below runs at 10 mins past each hour.

# schedule-create --minute 10 --name backup-schedule

Use the backup-create command with --schedule-name to create a scheduled backup.

# backup-create --ip 10.200.79.8 --path /bak/83 --schedule-name backup-schedule
Export path: /bak/83
IP: 10.200.79.8/24
Schedule name: backup-schedule
Schedule expression: 10 * * * *
ID: d2057cf2-8c16-45fb-81a8-99d4f62e0391

Check the backup schedule with the backup-schedule-list command.

# backup-schedule-list
Export path: /bak/83
IP: 10.200.79.8/24
Schedule name: backup-schedule
Schedule expression: 10 * * * * (At 10 minutes past the hour)
ID: d2057cf2-8c16-45fb-81a8-99d4f62e0391

To change or remove a schedule and/or change backup location, use the backup-update command. This example changes the schedule from the hourly to a daily schedule.

# backup-update --ip 10.200.79.8 --path /backup --schedule-name backup-schedule-daily
Export path: /bak/83
IP: 10.200.79.8
Schedule name: backup-schedule-daily
Schedule expression: 59 23 * * * (At 11:59 PM)
ID: d2057cf2-8c16-45fb-81a8-99d4f62e0391

Listing Backups

The backup-list command can be used to list available backups.

# backup-list --ip 10.200.79.8 --path /bak/83

total 1

Cluster UUID: 7d170b64-c472-453d-a627-94e9f8f363c7

Available Backups:

Name: 20210716.072526Z
Time: Fri Jul 16 07:25:28 UTC 2021
Cluster name: SITE-B-42805
Management IP: 10.200.79.83
Site name: SITE-B-42805

Restoring from a Backup

The backup-restore command restores the system configuration and metadata. It does not restore or modify any user data.

A metadata backup must be restored to the same Anvil configuration as where the backup was taken. For example, a backup of an HA Anvil configuration must be restored to a HA installation.

The time for a restore depends on the size of the backup, most configurations are restored in less than 10 minutes.

The following example provides the IP address of the storage node and the export path to restore from.

> backup-restore --ip 10.200.79.8 --path /backup
backup restore started

It is only supported to run a restore operation from a freshly installed system that has not yet been used.