garage/doc/book/connect/backup.md
Baptiste Jonglez 47e57518ec
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Add documentation on running Kopia with Garage
2022-04-10 13:04:07 +02:00

2.6 KiB

+++ title = "Backups (restic, duplicity...)" weight = 25 +++

Backups are essential for disaster recovery but they are not trivial to manage. Using Garage as your backup target will enable you to scale your storage as needed while ensuring high availability.

Borg Backup

Borg Backup is very popular among the backup tools but it is not yet compatible with the S3 API. We recommend using any other tool listed in this guide because they are all compatible with the S3 API. If you still want to use Borg, you can use it with rclone mount.

Restic

External links: Restic Documentation > Amazon S3

Duplicity

External links: Duplicity > man (scroll to "URL Format" and "A note on Amazon S3")

Duplicati

External links: Duplicati Documentation > Storage Providers

The following fields need to be specified:

Storage Type: S3 Compatible
Use SSL: [ ] # Only if you have SSL
Server: Custom server url (s3.garage.localhost:3900)
Bucket name: bucket-name
Bucket create region: Custom region value (garage) # Or as you've specified in garage.toml
AWS Access ID: Key ID from "garage key info key-name"
AWS Access Key: Secret key from "garage key info key-name"
Client Library to use: Minio SDK

Click Test connection and then no when asked The bucket name should start with your username, prepend automatically?. Then it should say Connection worked!.

knoxite

External links: Knoxite Documentation > Storage Backends

kopia

External links: Kopia Documentation > Repositories

To create the Kopia repository, you need to specify the region, the HTTP(S) endpoint, the bucket name and the access keys. For instance, if you have an instance of garage running on https://garage.example.com:

kopia repository create s3 --region=garage --bucket=mybackups --access-key=KEY_ID --secret-access-key=SECRET_KEY --endpoint=garage.example.com

Or if you have an instance running on localhost, without TLS:

kopia repository create s3 --region=garage --bucket=mybackups --access-key=KEY_ID --secret-access-key=SECRET_KEY --endpoint=localhost:3900 --disable-tls

After the repository has been created, check that everything works as expected:

kopia repository validate-provider

You can then run all the standard kopia commands: kopia snapshot create, kopia mount... Everything should work out-of-the-box.