Backups with restic
If you are looking for a backup solution for your working machine or any other machine, restic may be a valuable solution for you. Restic is an easy-to-use, CLI-based backup tool that works on Linux, BSD, Mac, and Windows. It allows to make snapshots of a system, thereby allowing to restore not just the latest but also previous states of a system. It is fully encrypted.
The following describes how to set it up restic to backup data to a OpenStack Swift Object Store Container in the h-da.cloud. This allows you to backup your data from campus or any other point in the internet to a drive in the h-da.cloud. Obviously, your backup speed depends on your available upload to the h-da.cloud. However, when doing a backup, restic will only upload files that have changed (or were newly created) since the last backup.
As a first-class feature restic makes use of encryption in every part of the process.
Setup
This will describe how to setup a local restic to backup data to a h-da.cloud OpenStack Object Container. The official restic documentation on how to do that can be found here. However, there is a tweak to it in order to get it going with h-da.cloud.
- Request a h-da.cloud OpenStack project
- Instructions can be found here
- Please be aware:
- Usage quota for object storage is limited in a new project (as of Jan '23 approx. 200GB)
- If you plan to upload a high amount of data make sure your to have your quota increased
- Please only request a quota increase if you are sure to need it
- Establish CLI access from your machine to h-da.cloud
- Instructions can be found here
- Make sure you have proper CLI access before proceeding
- Important: change environment variable
OS_AUTH_URL
- During the setup of CLI access using OpenStack RC file the environment variable
OS_AUTH_URL
is set - This the value of this variable needs to be appended with
/v3/
- This should work:
$ export OS_AUTH_URL=$OS_AUTH_URL/v3/
- This should transform
https://h-da.cloud:13000
intohttps://h-da.cloud:13000/v3/
as value of$OS_AUTH_URL
- During the setup of CLI access using OpenStack RC file the environment variable
- Install restic locally
- Instructions for your OS can be found here
- Create a new repository
$ restic -r swift:container_name:/path init # path is optional
- You will be asked for a password for the repository encryption and it should be created without errors
For further details on how to use restic for your backup needs, please refer to the official documentation with can be found here.