Restoring a Cloud Backup (CLI)

Cloud backups can be restored on any Oracle ZFS Storage Appliance system that has access to the cloud target. When a cloud backup with the zfs format contains a snapshot with a retention hold, that hold is preserved when the cloud backup is restored. Therefore, that snapshot and the share containing the snapshot cannot be deleted until the retention hold is released. However, filesystems, LUNs, and other snapshots within the share can be modified or deleted. For information about modifying a snapshot retention hold, see Editing a Snapshot Retention Policy (CLI).

Filesystem snapshots that contain files created with the file retention feature (not the snapshot retention feature) are subject to the rules governing file retention. For information, see Planning Guidelines for File Retention.

Filesystem cloud backups created with the tar format can be restored on Oracle ZFS Storage Appliance or on any system, regardless of its operating system, that can access the cloud target. After restoring a tar cloud backup on Oracle ZFS Storage Appliance, set the filesystem's properties, as described in Editing a Filesystem or LUN (CLI). If the filesystem snapshot had a retention hold, that property is not preserved. To set a retention hold, see Editing a Snapshot Retention Policy (CLI).

  1. Go to configuration services cloud backups.
    hostname:> configuration services cloud backups
  2. Enter ls to view the properties and cloud backups.

    The Backups list contains completed cloud backups, and is in chronological order. Up to one hundred cloud backups are displayed at one time.

    hostname:configuration services cloud backups> ls
    Properties:
       total    = 68
       selected = 68
       target   = (unset)
       format   = (unset)
       source   = (unset)
       dataset  = (unset)
       parent   = (unset)
    Backups:
    BACKUP     UPLOADED           TARGET      SOURCE   DATASET
    backup-000 2019-8-04 17:14:08 oci-phoenix hostname p1/local/default/fs-1@snap2
    backup 001 2019-8-04 17:25:36 oci-phoenix hostname p1/local/default/fs-1@snap31
    .
    .
    .
  3. Find and select the cloud backup to restore.
    hostname:configuration services cloud backups> select backup-000
    hostname:configuration services cloud backup-000>
  4. Enter restore.
    hostname:configuration services cloud backups> restore
    hostname:configuration services cloud backup-000 restore (uncommitted)>
  5. Enter ls to view the restore operation properties.
    hostname:configuration services cloud backup-000 restore (uncommitted)> ls
    Properties:
                   pool = (unset)
                project = (unset)
                  share = (unset)
  6. For your system, set the pool, project, and share properties. Either enter a new local share name to which to restore the dataset, or set useshare to true, and enter an existing local share name. The default for useshare is false.

    For a full (parent) cloud backup, if you enter a share name that has a parent snapshot in it, the parent snapshot is overwritten.

    For an incremental cloud backup, you can enter the same share name that has the parent snapshot. If you later repeat restoring an incremental cloud backup into the same share that has the parent snapshot, the old incremental snapshot is overwritten.

    hostname:configuration services cloud backup-000 restore (uncommitted)> set pool=p1
    hostname:configuration services cloud backup-000 restore (uncommitted)> set project=default
    hostname:configuration services cloud backup-000 restore (uncommitted)> set useshare=true
    hostname:configuration services cloud backup-000 restore (uncommitted)> set share=existing-share-name
    hostname:configuration services cloud backup-000 restore (uncommitted)>
  7. Enter commit.
    hostname:configuration services cloud backup-000 restore (uncommitted)> commit
    hostname:configuration services cloud>
  8. Go to jobs and enter ls to view the cloud jobs.

    The Jobs list contains active and recently completed jobs in the cloud data service, and is in chronological order.

    hostname:configuration services cloud jobs> ls
    Jobs:
    JOB      OPERATION  CREATED
    job-000  backup     2019-8-03 15:05:53
    job-001  restore    2019-8-06 17:14:36
  9. Select the cloud job by its number, and enter ls to view its details.

    The restored cloud backup will not be available from configured storage protocols until the restore job has completed.

    If the write_limit property was set for the cloud target, the write traffic bandwidth is limited to the set value when uploading the cloud backup to the cloud target.

    hostname:configuration services cloud jobs> select job-001
    hostname:configuration services cloud job-001> ls
                         op = restore
                     target = 9ca87404-24e2-11e9-a929-0b69dceb9c81
                 targetName = oci-phoenix
                    created = 2019-8-06 17:14:36
                    updated = 2019-8-11 20:33:09
                         id = cbb88888852e58088/445c15865cb329c3
                     status = in-progress
                     format = zfs
                       rate = 74KB/s
                transferred = 5.98G
             estimated_size = 1.00T
                    dataset = p1/local/default/fs-1
                     backup = 3e035b7e546e0d02/1cbfdb5ff2259b76
                   snapshot = snap2
                    details = uploading backup to zfs/backups/zfs/3e035b7e546e0d02/db7fd6c55558cea0/000000001
  10. After the restore operation has completed, you can view cloud backup details:
    1. Go to configuration services cloud backups.
    2. Select the cloud backup by its number.
      hostname:configuration services cloud backups> select backup-000
    3. Enter ls to view the cloud backup details.
      hostname:configuration services cloud backup-000> ls
      Properties:
                    target = oci-phoenix
                    source = hostname
                   dataset = p1/local/default/fs-1@snap2
                    format = zfs
                      tier = standard
                      size = 1.00T
                   started = 2019-8-03 15:05:53
                  uploaded = 2019-8-04 17:14:08
                        id = cbb88888852e58088/445c15865cb329c3