From fa89d2941f154a3d6c8e10927c8bb66d09e7dd65 Mon Sep 17 00:00:00 2001 From: Nicco Date: Tue, 24 Dec 2019 19:05:26 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index 24d5908..f09ab7e 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While - Snapshot policies and pruning - Simple interface - Fully encrypted +- Backup & Restore docker volumes ### 📒 Docs @@ -20,6 +21,7 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While * [Pruning & Deleting old files](#pruning-and-snapshot-policies) * [Excluding files](#excluding-filesfolders) * [Hooks](#before--after-hooks) + * [Docker volumes](#-Docker-volumes) * [Backends](#-backends) * [Commands](#-commands) * [Examples](#-examples) @@ -190,6 +192,64 @@ locations: - echo "kthxbye" ``` +#### 🐳 Docker volumes + +Since version 0.13 autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem. + +Let see an example. + +###### docker-compose.yml + +```yaml +version: '3.7' + +volumes: + data: + name: my-data + +services: + api: + image: alpine + volumes: + - data:/foo/bar +``` + +###### .autorestic.yml + +```yaml +locations: + hello: + from: 'volume:my-data' + to: + - remote + options: + forget: + keep-last: 2 + +backends: + remote: + ... +``` + +Now you can backup and restore as always. + +```sh +autorestic -l hello backup +``` + +```sh +autorestic -l hello restore +``` + +If the volume does not exist on restore, autorestic will create it for you and then fill it with the data. + +### Limitations + +Unfortunately there are some limitations when backing up directly from a docker volume without mounting the volume to the host. If you are curious or have ideas how to improve this, please [read more here](https://github.com/cupcakearmy/autorestic/issues/4#issuecomment-568771951). Any help is welcomed 🙂 + +1. Incremental updates are not possible right now due to how the current docker mounting works. +2. Exclude patterns and files also do not work as restic only sees a compressed tarball as source and not the actual data. + ## 💽 Backends Backends are the place where you data will be saved. Backups are incremental and encrypted. From f10b8c799044a0096d098504f6a0f9f003abbf6d Mon Sep 17 00:00:00 2001 From: Nicco Date: Wed, 8 Jan 2020 00:29:12 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f09ab7e..ecc4978 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,16 @@ For each backend you need to specify the right variables as shown in the example The path on the remote server. For object storages as -##### Example +##### Example Local + +```yaml +backends: + name-of-backend: + type: local + path: /data/my/backups +``` + +##### Example Backblaze ```yaml backends: @@ -286,6 +295,19 @@ backends: B2_ACCOUNT_KEY: backblaze_account_key ``` +##### Example S3 / Minio + +```yaml +backends: + name-of-backend: + type: s3 + path: s3.amazonaws.com/bucket_name + # Minio + # path: http://localhost:9000/bucket_name + AWS_ACCESS_KEY_ID: my_key + AWS_SECRET_ACCESS_KEY: my_secret +``` + ## 👉 Commands * [info](#info)