Provisioning the backup service

The backup service, based on OpenStack Freezer, provides data protection for VM volumes located on the local storage (Virtuozzo Storage). The service allows you to back up compute volumes, and then restore virtual machines and volumes from them. This helps to prevent data loss and mitigate issues with software or hardware.

You can configure the backup service to use the local storage or send backups to external NFS or S3-compatible object storage.

Backups can be created and managed by both administrators and self-service users. However, to provide this functionality, you need to enable the backup service by using the vinfra command-line tool.

Limitations

  • The backup service cannot be disabled.

Prerequisites

To enable and configure the backup service

Use the following command:

vinfra service compute backup configure [--enable] --driver {posix,nfs,s3} [--posix-path <path>]
                                        [--nfs-share <host>:<share>] [--nfs-mount-options <options>]
                                        [--s3-endpoint-url <url>] [--s3-store-access-key <access-key>]
                                        [--s3-store-secret-key <secret-key>] [--s3-store-bucket <bucket>]
                                        [--s3-verify-ssl] [--s3-no-verify-ssl] [--concurrent-jobs <int>]
                                        [--volume-batch-size <int>]
--enable
Enable compute backup service
--driver {posix,nfs,s3}
Backup driver to use. Possible values are: posix, nfs, and s3.
--posix-path <path>
Absolute path for storing backups
--nfs-share <host>:<share>

NFS share in the format <host>:<share>, where:

  • <host>: Node IP address or hostname;
  • <share>: NFS share name.
--nfs-mount-options <options>
Comma-separated list of standard NFS mount options
--s3-endpoint-url <url>
S3 endpoint URL
--s3-store-access-key <access-key>
S3 store access key
--s3-store-secret-key <secret-key>
S3 store secret key
--s3-store-bucket <bucket>
S3 bucket to store backups in
--s3-verify-ssl
Verify the SSL certificate for the S3 endpoint
--s3-no-verify-ssl
Don't verify the SSL certificate for the S3 endpoint
--concurrent-jobs <int>
Maximum number of concurrent jobs per scheduler
--volume-batch-size <int>
Maximum number of volume backups per job

Example 1. To enable and configure the backup service to send backups to external S3 bucket, run:

# vinfra service compute backup configure --enable --driver s3 --s3-endpoint-url https://s3.example.com \
--s3-store-access-key ccf52e4b<...> --s3-store-secret-key qoFfYUi3<...> --s3-store-bucket bucket1 --s3-verify-ssl

You can check the backup service configuration in the vinfra service compute backup show output:

# vinfra service compute backup show
+-------------------+------------------------+
| Field             | Value                  |
+-------------------+------------------------+
| concurrent_jobs   | 10                     |
| driver            | s3                     |
| s3_endpoint_url   | https://s3.example.com |
| s3_store_bucket   | bucket1                |
| s3_verify_ssl     | True                   |
| volume_batch_size | 5                      |
+-------------------+------------------------+

Example 2. To enable and configure the backup service to send backups to an external NFS share, and also change the maximum number of concurrent backup jobs to 15 and the maximum number of volume backups per job to 10, run:

# vinfra service compute backup configure --enable --driver nfs --nfs-share 10.10.10.10:myshare \
--nfs-mount-options lookupcache=none,nfsvers=4 --concurrent-jobs 15 --volume-batch-size 10

You can check the backup service configuration in the vinfra service compute backup show output:

# vinfra service compute backup show
+-------------------+----------------------------+
| Field             | Value                      |
+-------------------+----------------------------+
| concurrent_jobs   | 15                         |
| driver            | nfs                        |
| nfs_mount_options | lookupcache=none,nfsvers=4 |
| nfs_share         | 10.10.10.10:myshare        |
| volume_batch_size | 10                         |
+-------------------+----------------------------+