Use Case - Backup and Restore
Use your ZS3 buckets as backup storage space for your data
Last updated
Use your ZS3 buckets as backup storage space for your data
Last updated
After deploying your S3 server, you can use Restic to be able to use your bucket as backup storage space for your data, with better carbon footprint, security and performance.
Here are the steps to use your ZS3 buckets for backup using Restic:
Register to https://blimp.software
Deploy zs3server
as mentioned in this page. Once deployed, you can find your URL, access key and secret key in the "Use CLI" section in Blimp's S3 operations page, as shown in the image below.
Example of this command (with the credentials part in double square parts)
In this example:
The URL: https://blimpsogec.zus.network
The Access Key: devyetii
The secret key: Admin@123
Connect to the machine you'll be using for backup/restore. This can be your local machine, or any other remote machine that you have. If it's a remote machine, then you can use SSH to connect to it as follows:
Install Restic on your machine. Provided below are steps to install Restic on Ubuntu machine. For other Linux distros or other OSs, check Restic Installation Guide.
Prepare you environment variables as follows:
You should replace the placeholders in the command (<your-access-key-from-step2>
, <your-secret-key-from-step2>
and <your-url-from-step2>
) with the corresponding values from Step 2.
Initialize your Restic repository as follows:
After the repository is initialized, we're ready to make a backup. Find a local directory with data files to backup. Use below command to start back up.
You should replace the command placeholders (<your-zs3server-url-from-step2>
, <path-to-directory-to-backup>
) with corresponding values.
Now, a new backup snapshot of this directory is created and saved to the Restic repository. You can add this command to your crontab file to run the backup periodically.
You can also list all of your snapshots with the following command:
To restore the latest snapshot to a specific target you can use the following command:
For more sets of restic commands, you can refer to the official Restic Backup docs.