Skip to content

Restoring backups

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.

Usage

Backups can be restored to an environment easily.

Step 1: Find the backup name you wish to restore:

$ skpr backup list dev
──────────────── ─────────── ─────────────────────────────── ────────── ─────────── ─────────────────
NAME             PHASE       START TIME                      DURATION   DATABASES   VOLUMES          
──────────────── ─────────── ─────────────────────────────── ────────── ─────────── ─────────────────
dev-1631800800   Completed   2021-09-16 14:00:00 +0000 UTC   1s         default     private, public  
dev-1631714400   Completed   2021-09-15 14:00:00 +0000 UTC   2s         default     private, public  
dev-1631628000   Completed   2021-09-14 14:00:00 +0000 UTC   34s        default     private, public  
──────────────── ─────────── ─────────────────────────────── ────────── ─────────── ─────────────────

Step 2: Create the restore using the backup name as input:

$ skpr restore create dev dev-1631628000
Creating new restore
dev-pzwjn

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 restore list dev
─────────── ──────────────── ─────────── ─────────────────────────────── ────────── ─────────── ─────────────────
NAME        BACKUP           PHASE       START TIME                      DURATION   DATABASES   VOLUMES          
─────────── ──────────────── ─────────── ─────────────────────────────── ────────── ─────────── ─────────────────
dev-pzwjn   dev-1631628000   Completed   2021-09-17 05:09:04 +0000 UTC   2s         default     private, public  

More Information

$ skpr restore create --help
usage: skpr restore create [<flags>] [<environment>] [<backup>]

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

What's next?

After restoring a backup, consider one of the following: