Backup and restore your Key Value Store instance
Last updated on
Prerequisites
Section titled “Prerequisites”- You have created a Key Value Store instance.
Check Create and manage instances for Key Value Store
Introduction
Section titled “Introduction”Backup and restore is an essential feature to guarantee the SLAs of your service. STACKIT Key Value Store offers backup and restore capabilities to help you achieving this goal. These are the features of the backup and restore capabilities:
- Backup and in-place-restore of your instances
- Automated scheduled backups every 4 hours
- Create manual backups
- Download your backups
- backup retention for 14 days
- All settings are accessible by the Portal, the CLI, Cloud Foundry and Terraform
Backup
Section titled “Backup”STACKIT Key Value Store automatically creates a backup every 4 hours. These backups are held for 14 days. If you want a longer backup history, you need to download the created backups.
Backup settings and their description
Section titled “Backup settings and their description”| Setting | Description | Options |
|---|---|---|
| Encryption Key | Defines the key with which the STACKIT system encrypts the backup | custom string |
List existing backups
Section titled “List existing backups”You can get an overview of all existing backups.
You can view all backups by navigating to the Backups tab at the service dashboard of your instance.
-
Navigate to Key Value Store in the STACKIT Portal.
-
Select your Key Value Store instance.
-
In the sidebar select Backups.
-
You see a list of all backups with their properties:
ID, Start time, End time, Backup size, Backup status, Restore created at
If you created an encryption key prior to the start time of a backup, you are able to download the backup via its three dots menu.
Create an encryption key
Section titled “Create an encryption key”Create an encryption key to be able to download your backups. Store the key in a safe place.
- Navigate to Key Value Store in the STACKIT Portal.
- Select your Key Value Store instance.
- In the sidebar select Backups.
- In the top bar select Create encryption key.
- Enter an encryption key with a minimum length of 8 characters and select Create.
- Read the note and select Done.
Trigger a manual backup
Section titled “Trigger a manual backup”You can trigger a manual backup any time.
- Navigate to Key Value Store in the STACKIT Portal.
- Select your Key Value Store instance and go to Backups.
- Select Create manual backup.
- In the popup select Create.
- Wait until the status of the backup is Done.
Download a backup
Section titled “Download a backup”You can download a backup any time.
- Navigate to Key Value Store in the STACKIT Portal.
- Select your Key Value Store instance and go to Backups.
- Choose a backup to download. In the three-dots-menu select Download. If there is no Download option, then the backup was created without encryption. Always create an encryption key before inserting important data into your instance.
- Wait until the download is completed.
Restore
Section titled “Restore”You can restore a specific backup to the same instance. To restore your backup to a separate instance, you need to download the backup and restore it manually after creating another instance.
Managed restore to the same instance
Section titled “Managed restore to the same instance”- Navigate to Key Value Store in the STACKIT Portal.
- Select your Key Value Store instance and go to Backups.
- In the backup’s three dots menu select Restore.
- On the popup, read the warning that all data in your instance will be overwritten. If you agree, select Restore.
Decrypting of a downloaded backup file
Section titled “Decrypting of a downloaded backup file”You can download and decrypt your backup files. This is useful, if you plan to store your data independently of STACKIT.
- Download the encrypted backup
- Navigate to Key Value Store in the STACKIT Portal.
- Select your Key Value Store instance and go to Backups.
- In the backup’s three dots menu select Download.
- Wait for the download to complete.
- Decrypt the downloaded backup
-
Open a shell and navigate to the folder where you downloaded the backup into.
-
Decrypt and unzip the backup:
<encrypted-backup-file>is the placeholder for the downloaded file.<target-backup-file-prefix>is the name of the target file without the file ending. You can freely choose this name according to the limitations of your local file system.Terminal window cat <encrypted-backup-file> | openssl enc -aes256 -md md5 -d -pass 'pass:<encryption-key>' > <target-backup-file-prefix>.rdb.tar.gztar -xvjf <target-backup-file-prefix>.sql.gz -
Verify the file: Use the
filecommand to verify the decrypted and uncompressed backup:Terminal window file dump.rdbIf everything is correct,
filewill return something like this:dump.rdb: Redis RDB file, version 0011
-