Skip to content

Backup Target Configuration

Remote and Archive backup configurations are managed by scripts in the following directory: /var/run/cluster-control/facts/snapshot/

Create the configuration files with the below example contents filled in for your deployment, based on needs and configuration.

Archive: /var/run/cluster-control/facts/snapshot/archive.json

Here is a sample archive.json:

{
    "destination": "archive",
    "bucket":       "sailfish",
    "accesskey":    "JQ37MHYZBMKZ1GKJ1Y78",
    "secretkey":    "0fYiDTZqv4nbTHIbpgo15zvpQ8qhUVOziGmhxbIB",
    "host":         "10.1.2.3",
    "port":         7480,
    "options":      "--no-ssl",
    "compress":     "cat",     
    "decompress":   "cat"
}

Parameters:

  • destination: Must be archive
  • bucket: The name of the S3 bucket to store the snapshots
  • accesskey: Your S3 access key
  • secretkey: Your S3 secret key
  • host: The IP address of the S3 endpoint
  • port: The port number of the S3 endpoint
  • options: Optional. Extra flags that s3cmd needs to upload snapshots
  • compress: Optional. Must be a valid compress command (i.e., bzip2 --compress)
  • decompress: Optional. Must be a valid decompress command (i.e., bzip2 --decompress)

Remote: /var/run/cluster-control/facts/snapshot/remote.json

Here is a sample remote.json:

{
    "destination": "remote",
    "host":         "10.1.2.3",
    "image_prefix": "sailfish",
    "pool":         "rbd",     
    "ssh_options":  "",      
    "compress":     "",     
    "decompress":   ""   
}

Parameters:

  • destination: Must be remote
  • host: IP address of remote HyperCloud cluster's dashboard
  • image_prefix: The label that will be the prefix of the RBD image on the remote system that holds the snapshots
  • pool: The name of the pool on the remote system that the snapshots should be stored in
  • ssh_options: Any extra ssh options needed to login to the remote system
  • compress: Optional Must be a valid compress command (i.e., bzip2 --compress)
  • decompress: Optional Must be a valid decompress command (i.e., bzip2 --decompress)

Backup Interval Configuration

Note

This is configured on a per-VM basis.

A tool available on the dashboard node is: hypercloud-generate-snapsched

Its usage is detailed below.

[lancelot] root@hypercloud-dashboard:~# hypercloud-generate-snapsched --help
Usage: hypercloud-generate-snapsched <options>
All Options are Optional

Local Backup Options: 
     --local-hourly=<NUM>
     --local-daily=<NUM>[@TIME]
     --local-weekly=<NUM>[@TIME]
     --local-monthly=<NUM>[@TIME]
     --local-yearly=<NUM>[@TIME]
Remote Backup Options: 
     --remote-hourly=<NUM>
     --remote-daily=<NUM>[@TIME]
     --remote-weekly=<NUM>[@TIME]
    --remote-monthly=<NUM>[@TIME]
     --remote-yearly=<NUM>[@TIME]
Archive Backup Options: 
     --archive-hourly=<NUM>
     --archive-daily=<NUM>[@TIME]
     --archive-weekly=<NUM>[@TIME]
     --archive-monthly=<NUM>[@TIME]
     --archive-yearly=<NUM>[@TIME]
Other Options: 
     --vmid=<VMID>          Set the SNAPSHOT_SCHEDULE for specified VMID
     --help                 Print this help message

NUM = Number of snapshots to retain for the specified period
TIME = Time to take the snapshot, based on the period, as specified below: 
     Daily Time Options: 
          Hour in 24-hour time: 0-23
          Hour in 24-hour time, padded with zeros: 00-23
     Weekly Time Options: 
          Number Day of the Week: 0-6 (Starting with Sunday)
          Abbreviated Name of the Day of the Week: Sun,Mon,Tue,Wed,Thu,Fri,Sat
          Full Name of Day of the Week: Sunday,Monday,Tuesday,etc.
     Monthly Time Options: 
          Number Day of the Month: 1-31
          Number Day of the Month, padded with zeros: 01-31
     Yearly Time Options: 
          Number Month of the Year, padded with zeros: 01-12
          Day of the Year, padded with zeros: 001-366
          Abbreviated Name of Month: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
          Full Name of the Month: January,February,March,April,etc.

Parse Monitoring Attributes

Monitoring attributes to track remote, local, and archive backup usage. This information may be hard to decode, so another tool is also available to decode this data, hypercloud-convert-base64.

Example usage is below:

[lancelot] root@hypercloud-dashboard:~# hypercloud-convert-base64 $( hypercloud vm show 3 | grep HYPERCLOUD_LOCAL_SNAPUSAGE | awk '{print $NF}' ) ; echo
{"local_snapshot_usage":[
{"images":[{"name":"one-1-3-0","snapshot":"one-4ed072bf-993b-4612-b6be-79563727f382","provisioned_size":209715200,"used_size":79691776},{"name":"one-1-3-0","snapshot":"one-759fbc69-8d2b-4286-a3ae-84ad26438c72","provisioned_size":209715200,"used_size":8388608},{"name":"one-1-3-0","snapshot":"one-cba23767-160c-4915-a43d-84b95206d8dc","provisioned_size":209715200,"used_size":8388608},{"name":"one-1-3-0","snapshot":"one-bee0b880-50ff-430c-bd05-a42b7e8a7ba1","provisioned_size":209715200,"used_size":8388608},{"name":"one-1-3-0","provisioned_size":209715200,"used_size":8388608}]}
]}
[lancelot] root@hypercloud-dashboard:~# 

Importing Remote or Archive Images

There are two Marketplaces available for VM Image retention, HyperCloud Remote Backups and HyperCloud Archive Backups. Simply import the Image from these Marketplaces and use them like any other normal Image in the Datastore after the import process completes. VMs with multiple disks will need to have its Template updated to attach all related disks prior to VM instantiation.

Manually Download Archive Images

The Dashboard tool, hypercloud-download-archive, allows the end user to directly download archive images if needed.

Usage is:

"Usage: hypercloud-download-archive <URL> <OUTPUT>".

URL is in the format of archive://<IMAGE>@<SNAPSHOT>. For example, to download auto-v2-hourly-202007311700-3 from image one-1-3-0 to /dashboard/staging/tmp/test.raw, run:

hypercloud-download-archive archive://one-1-3-0@auto-v2-hourly-202007311700-3 /dashboard/staging/tmp/test.raw

The image will automatically be uncompressed, decrypted, and/or combined with all full and incremental backups to re-hydrate a fully usable image.

Long-term Archival of VMs

If the long-term archival of a VM is desired, simply create a new attribute titled OVERRIDE_SNAPUSAGE_SCHED and set the value to something non-null to cause the VM to be excluded from hypercloud-snapshotd processing. This attribute also allows for hypercloud-snapusaged to continue accounting for snapshot usage even in the event of SNAPSHOT_SCHEDULE being removed from the VM.