Restoring volume backups
Like general backups Volume backups can be restored across environments by developers with access. This can be useful for when an environment needs to be reset to a specific state, moved across environments or if a point-in-time record needs to be created. Do note that you can't run backups on the same volume simultanously (whilte there is another backup operation already running on it).
Usage
Volume backups can be restored to an environment easily.
Step 1: Find the Backup ID
you wish to restore:
$ skpr volume backup list stg
─────────── ─────────────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
BACKUP ID NAME PHASE START TIME COMPLETION TIME DURATION VOLUME
─────────── ─────────────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
stg-26d7j stg-26d7j-public Completed 20 Apr 24 07:49 +0000 20 Apr 24 07:49 +0000 3s drupal-stg-public
stg-8slgf stg-8slgf-private Completed 20 Apr 24 07:11 +0000 20 Apr 24 07:11 +0000 13s drupal-stg-private
─────────── ─────────────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
Step 2: Create the restore using the backup Backup ID
as input:
$ skpr volume restore create stg stg-8slgf private
Creating new restore
stg-mkrbp
Step 3: Verify the restore was created (optional)
Note that this step will also provide you with details on the start time, how long the process took and what the completion phase was.
$ skpr volume restore list stg
──────────── ─────────────────── ─────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
RESTORE ID NAME BACKUP ID PHASE START TIME COMPLETION TIME DURATION VOLUME
──────────── ─────────────────── ─────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
stg-mkrbp stg-mkrbp-private stg-8slgf Completed 20 Apr 24 07:53 +0000 20 Apr 24 07:53 +0000 3s drupal-stg-private
──────────── ─────────────────── ─────────── ─────────── ─────────────────────── ─────────────────────── ────────── ────────────────────
More Information
$ skpr volume restore create --help
usage: skpr volume restore create [<flags>] [<environment>] [<backup>] [<volume-name>]
Create an restore on demand
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-w, --wait Wait for restore to complete
Args:
[<environment>] Environment to restore
[<backup>] Name of the backup to use
[<volume-name>] Name of the Volume to restore from the backup
Volume Name (<volume-name>
)
Argument <volume-name>
refers to the name of the volume that needs to be backed up.
There are three types of volumes:
* Public
* Private
* Temp
The only ones that you can backup are public
and private
.
What's next?
After restoring a backup, consider one of the following: