From cbc1b337505c71d186d8b87910a0ffb62ca698ec Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 23 Jul 2020 13:33:14 +0200 Subject: [PATCH] docs --- docs/backend/available.html | 10 +++++----- docs/backend/overview.html | 10 +++++----- docs/cli/backup.html | 10 +++++----- docs/cli/check.html | 10 +++++----- docs/cli/cron.html | 10 +++++----- docs/cli/exec.html | 10 +++++----- docs/cli/forget.html | 10 +++++----- docs/cli/info.html | 10 +++++----- docs/cli/install.html | 10 +++++----- docs/cli/restore.html | 10 +++++----- docs/cli/uninstall.html | 10 +++++----- docs/cli/update.html | 10 +++++----- docs/config.html | 10 +++++----- docs/contrib.html | 10 +++++----- docs/examples.html | 10 +++++----- docs/index.html | 10 +++++----- docs/installation.html | 10 +++++----- docs/location/cron.html | 10 +++++----- docs/location/docker.html | 10 +++++----- docs/location/exclude.html | 10 +++++----- docs/location/forget.html | 10 +++++----- docs/location/hooks.html | 10 +++++----- docs/location/overview.html | 10 +++++----- docs/qa.html | 10 +++++----- docs/quick.html | 10 +++++----- 25 files changed, 125 insertions(+), 125 deletions(-) diff --git a/docs/backend/available.html b/docs/backend/available.html index d301e5b..d93a89d 100644 --- a/docs/backend/available.html +++ b/docs/backend/available.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkAvailable Backends

In theory all the restic backends are supported.

Those tested are the following:

linkLocal

1backends:

2 name-of-backend:

3 type: local

4 path: /data/my/backups

linkBackblaze

1backends:

2 name-of-backend:

3 type: b2

4 path: 'myAccount:myBucket/my/path'

5 B2_ACCOUNT_ID: backblaze_account_id

6 B2_ACCOUNT_KEY: backblaze_account_key

linkS3 / Minio

1backends:

2 name-of-backend:

3 type: s3

4 path: s3.amazonaws.com/bucket_name

5 # Minio

6 # path: http://localhost:9000/bucket_name

7 AWS_ACCESS_KEY_ID: my_key

8 AWS_SECRET_ACCESS_KEY: my_secret

linkSFTP

For SFTP to work you need to use configure your host inside of ~/.ssh/config as password prompt is not supported. For more information on this topic please see the official docs on the matter.

1backends:

2 name-of-backend:

3 type: sftp

4 path: my-host:/remote/path/on/the/server

linkAvailable Backends

In theory all the restic backends are supported.

Those tested are the following:

linkLocal

1backends:

2 name-of-backend:

3 type: local

4 path: /data/my/backups

linkBackblaze

1backends:

2 name-of-backend:

3 type: b2

4 path: 'myAccount:myBucket/my/path'

5 B2_ACCOUNT_ID: backblaze_account_id

6 B2_ACCOUNT_KEY: backblaze_account_key

linkS3 / Minio

1backends:

2 name-of-backend:

3 type: s3

4 path: s3.amazonaws.com/bucket_name

5 # Minio

6 # path: http://localhost:9000/bucket_name

7 AWS_ACCESS_KEY_ID: my_key

8 AWS_SECRET_ACCESS_KEY: my_secret

linkSFTP

For SFTP to work you need to use configure your host inside of ~/.ssh/config as password prompt is not supported. For more information on this topic please see the official docs on the matter.

1backends:

2 name-of-backend:

3 type: sftp

4 path: my-host:/remote/path/on/the/server

linkRest Server

See here for how to install a rest server backend and here for further documentation.

1backends:

2 name-of-backend:

3 type: rest

4 path: http://localhost:8000/repo_name

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/backend/overview.html b/docs/backend/overview.html index 6cd9584..2cfc999 100644 --- a/docs/backend/overview.html +++ b/docs/backend/overview.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link💽 Backends

Backends are the ouputs of the backup process. Each location needs at least one.

.autorestic.yml
1backends:

2 name-of-backend:

3 type: local

4 path: /data/my/backups

linkTypes

We restic supports multiple types of backends. See the full list for details.

link💽 Backends

Backends are the ouputs of the backup process. Each location needs at least one.

.autorestic.yml
1backends:

2 name-of-backend:

3 type: local

4 path: /data/my/backups

linkTypes

We restic supports multiple types of backends. See the full list for details.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/backup.html b/docs/cli/backup.html index e2d8c4c..a141de1 100644 --- a/docs/cli/backup.html +++ b/docs/cli/backup.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkBackup

1autorestic backup [-l, --location] [-a, --all]

Performes a backup of all locations if the -a flag is passed. To only backup some locations pass one or more -l or --location flags.

1autorestic backup -l my-location

linkBackup

1autorestic backup [-l, --location] [-a, --all]

Performes a backup of all locations if the -a flag is passed. To only backup some locations pass one or more -l or --location flags.

1autorestic backup -l my-location

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/check.html b/docs/cli/check.html index 5c9eef5..1adee65 100644 --- a/docs/cli/check.html +++ b/docs/cli/check.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkcheck

1autorestic check [-b, --backend] [-a, --all]

Cheks if one or more backend are configured properly and initializes them if they are not already.

This is mostly an internal command, but useful to verify if a backend is configured correctly.

1autorestic check -b my-backend

linkcheck

1autorestic check [-b, --backend] [-a, --all]

Cheks if one or more backend are configured properly and initializes them if they are not already.

This is mostly an internal command, but useful to verify if a backend is configured correctly.

1autorestic check -b my-backend

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/cron.html b/docs/cli/cron.html index 28db1b9..37fc248 100644 --- a/docs/cli/cron.html +++ b/docs/cli/cron.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkCron

1autorestic cron

This command is modtly intended to be triggered by an automated system like systemd or crontab.

It will run cron jobs es specified in the cron section of a specific location.

linkCron

1autorestic cron

This command is modtly intended to be triggered by an automated system like systemd or crontab.

It will run cron jobs es specified in the cron section of a specific location.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/exec.html b/docs/cli/exec.html index 1ceebfc..d860715 100644 --- a/docs/cli/exec.html +++ b/docs/cli/exec.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkExec

1autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]

This is avery handy command which enables you to run any native restic command on desired backends. An example would be listing all the snapshots of all your backends:

1autorestic exec -a -- snapshots

With exec you can basically run every cli command that you would be able to run with the restic cli. It only prefillst path, key, etc.

linkExec

1autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]

This is avery handy command which enables you to run any native restic command on desired backends. An example would be listing all the snapshots of all your backends:

1autorestic exec -a -- snapshots

With exec you can basically run every cli command that you would be able to run with the restic cli. It only prefillst path, key, etc.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/forget.html b/docs/cli/forget.html index 202149d..1c088a7 100644 --- a/docs/cli/forget.html +++ b/docs/cli/forget.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkForget

1autorestic forget [-l, --location] [-a, --all] [--dry-run]

This will prune and remove old data form the backends according to the keep policy you have specified for the location

The --dry-run flag will do a dry run showing what would have been deleted, but won't touch the actual data.

linkForget

1autorestic forget [-l, --location] [-a, --all] [--dry-run]

This will prune and remove old data form the backends according to the keep policy you have specified for the location

The --dry-run flag will do a dry run showing what would have been deleted, but won't touch the actual data.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/info.html b/docs/cli/info.html index 0380f91..a1bd31f 100644 --- a/docs/cli/info.html +++ b/docs/cli/info.html @@ -36,7 +36,7 @@ font-family: 'Material Icons Outlined'; }
Star

Created With

linkinfo

Displays the config file that autorestic is refering to. -Usefull when you want to quickly see what locations are being backuped where.

Pro tip: if it gets a bit long you can read it more easily with autorestic info | less 😉

1autorestic info

linkWith a custom file

1autorestic -c path/to/some/config.yml info

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -60,4 +60,4 @@ Usefull when you want to quickly see what locations are being backuped where.

Exec Install Uninstall -Update

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/install.html b/docs/cli/install.html index 9dd13bf..5b771cb 100644 --- a/docs/cli/install.html +++ b/docs/cli/install.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkInstall

Installs both restic and autorestic to /usr/local/bin.

1autorestic install

linkInstall

Installs both restic and autorestic to /usr/local/bin.

1autorestic install

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/restore.html b/docs/cli/restore.html index a4f4771..030eecf 100644 --- a/docs/cli/restore.html +++ b/docs/cli/restore.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkRestore

1autorestic restore [-l, --location] [--from backend] [--to <out dir>]

This will restore all the locations to the selected target. If for one location there are more than one backends specified autorestic will take the first one.

linkExample

1autorestic restore -l home --from hdd --to /path/where/to/restore

This will restore the location home to the /path/where/to/restore folder and taking the data from the backend hdd

linkRestore

1autorestic restore [-l, --location] [--from backend] [--to <out dir>]

This will restore all the locations to the selected target. If for one location there are more than one backends specified autorestic will take the first one.

linkExample

1autorestic restore -l home --from hdd --to /path/where/to/restore

This will restore the location home to the /path/where/to/restore folder and taking the data from the backend hdd

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/uninstall.html b/docs/cli/uninstall.html index 4e6daa7..eeb3dc4 100644 --- a/docs/cli/uninstall.html +++ b/docs/cli/uninstall.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkUninstall

Installs both restic and autorestic from /usr/local/bin.

1autorestic uninstall

linkUninstall

Installs both restic and autorestic from /usr/local/bin.

1autorestic uninstall

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/update.html b/docs/cli/update.html index b82bcb2..73e70e6 100644 --- a/docs/cli/update.html +++ b/docs/cli/update.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkUpdate

Autorestic can update itself! Super handy right? Simply run autorestic update and we will check for you if there are updates for restic and autorestic and install them if necessary.

1autorestic update

Updates both restic and autorestic automagically.

linkUpdate

Autorestic can update itself! Super handy right? Simply run autorestic update and we will check for you if there are updates for restic and autorestic and install them if necessary.

1autorestic update

Updates both restic and autorestic automagically.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/config.html b/docs/config.html index 19409e6..b1b5199 100644 --- a/docs/config.html +++ b/docs/config.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🎛 Config File

linkPath

By default autorestic searches for a .autorestic.yml file in the current directory and your home folder.

You can also specify a custom file with the -c path/to/some/config.yml

⚠️ WARNING ⚠️

Note that the data is automatically encrypted on the server. The key will be generated and added to your config file. Every backend will have a separate key. You should keep a copy of the keys or config file somewhere in case your server dies. Otherwise DATA IS LOST!

linkExample configuration

.autorestic.yml
1locations:

2 home:

3 from: /home/me

4 to: remote

5

6 important:

7 from: /path/to/important/stuff

8 to:

9 - remote

10 - hdd

11

12backends:

13 remote:

14 type: b2

15 path: 'myBucket:backup/home'

16 B2_ACCOUNT_ID: account_id

17 B2_ACCOUNT_KEY: account_key

18

19 hdd:

20 type: local

21 path: /mnt/my_external_storage

link🎛 Config File

linkPath

By default autorestic searches for a .autorestic.yml file in the current directory and your home folder.

  • ./.autorestic.yml
  • ~/.autorestic.yml

You can also specify a custom file with the -c path/to/some/config.yml

⚠️ WARNING ⚠️

Note that the data is automatically encrypted on the server. The key will be generated and added to your config file. Every backend will have a separate key. You should keep a copy of the keys or config file somewhere in case your server dies. Otherwise DATA IS LOST!

linkExample configuration

.autorestic.yml
1locations:

2 home:

3 from: /home/me

4 to: remote

5

6 important:

7 from: /path/to/important/stuff

8 to:

9 - remote

10 - hdd

11

12backends:

13 remote:

14 type: b2

15 path: 'myBucket:backup/home'

16 B2_ACCOUNT_ID: account_id

17 B2_ACCOUNT_KEY: account_key

18

19 hdd:

20 type: local

21 path: /mnt/my_external_storage

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/contrib.html b/docs/contrib.html index 10c3bb1..9e96613 100644 --- a/docs/contrib.html +++ b/docs/contrib.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🙋‍♀️🙋‍♂️ Contributors

This amazing people helped the project!

link🙋‍♀️🙋‍♂️ Contributors

This amazing people helped the project!

  • @ChanceM [Docs]
  • @EliotBerriot [Docs, Pruning, S3]

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/examples.html b/docs/examples.html index 7512e0a..f9527fb 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🐣 Examples

linkList all the snapshots for all the backends

1autorestic -a exec snapshots

linkUnlock a locked repository

If you accidentally cancelled a running operation this could be useful.

Only do this if you know what you are doing.

1autorestic -b my-backend exec unlock

link🐣 Examples

linkList all the snapshots for all the backends

1autorestic -a exec snapshots

linkUnlock a locked repository

If you accidentally cancelled a running operation this could be useful.

Only do this if you know what you are doing.

1autorestic -b my-backend exec unlock

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index eba3209..0d42254 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ }
Star

Created With

linkautorestic

High backup level CLI utility for restic.

Autorestic is a wrapper around the amazing restic. While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂

-

link✈️ Roadmap

I would like to make the official 1.0 release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)

As of version 0.18 crons are supported wich where the last feature missing for a 1.0. Will test this for a few weeks and then it's time for the first "real" release! 🎉 Also we now have waaay better docs 📒

link🌈 Features

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/installation.html b/docs/installation.html index eb3af35..6bba9e6 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🛳 Installation

Linux & macOS. Windows is not supported. If you have problems installing please open an issue :)

Autorestic requires curl, wget and bzip2 to be installed. For most systems these should be already installed.

1curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash

link🛳 Installation

Linux & macOS. Windows is not supported. If you have problems installing please open an issue :)

Autorestic requires curl, wget and bzip2 to be installed. For most systems these should be already installed.

1curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/cron.html b/docs/location/cron.html index 579b2eb..6e51605 100644 --- a/docs/location/cron.html +++ b/docs/location/cron.html @@ -37,7 +37,7 @@ }
Star

Created With

linkCron

Often it is usefull to trigger backups autmatically. For this we can specify a cron attribute to each location.

Available since version 0.18

.autorestic.yml
1locations:

2 my-location:

3 from: /data

4 to: my-backend

5 cron: '0 3 * * 0' # Every Sunday at 3:00

Here is a awesome website with some examples and an explorer

linkInstalling the cron

This has to be done only once, regadless of now many cros you have in your config file.

To actually enable cron jobs you need something to call autorestic cron on a timed shedule. Note that the shedule has nothing to do with the cron attribute in each location. -My advise would be to trigger the command every 5min, but if you have a cronjob that runs only once a week, it's probably enough to shedule it once a day.

linkCrontab

Here is an example using crontab, but systemd would do too.

First, open your crontab in edit mode

1crontab -e

Then paste this at the bottom of the file and save it. Note that in this specific example the .autorestic.yml is located in /srv/. You need to modify that part of course to fit your config file.

1# This is required, as it otherwise cannot find restic as a command.

2PATH="/usr/local/bin:/usr/bin:/bin"

3

4# Example running every 5 minutes

5*/5 * * * * autorestic -c /srv/.autorestic.yml cron

Now you can add as many cron attributes as you wish ⏱

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -61,4 +61,4 @@ My advise would be to trigger the command every 5min, but if you have a cronjob Exec Install Uninstall -Update

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/docker.html b/docs/location/docker.html index cac9f04..24eec87 100644 --- a/docs/location/docker.html +++ b/docs/location/docker.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkDocker

autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.

Available since version 0.13

Let see an example.

docker-compose.yml
1version: '3.7'

2

3volumes:

4 data:

5 name: my-data

6

7services:

8 api:

9 image: alpine

10 volumes:

11 - data:/foo/bar

.autorestic.yml
1locations:

2 hello:

3 from: 'volume:my-data'

4 to:

5 - remote

6 options:

7 forget:

8 keep-last: 14 # Useful for limitations explained belowd

9

10backends:

11 remote: ...

Now you can backup and restore as always.

1autorestic -l hello backup

1autorestic -l hello restore

If the volume does not exist on restore, autorestic will create it for you and then fill it with the data.

linkLimitations

Unfortunately there are some limitations when backing up directly from a docker volume without mounting the volume to the host:

  1. Incremental updates are not possible right now due to how the current docker mounting works. This means that it will take significantely more space.
  2. Exclude patterns and files also do not work as restic only sees a compressed tarball as source and not the actual data.

If you are curious or have ideas how to improve this, please read more here. Any help is welcomed 🙂

linkDocker

autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.

Available since version 0.13

Let see an example.

docker-compose.yml
1version: '3.7'

2

3volumes:

4 data:

5 name: my-data

6

7services:

8 api:

9 image: alpine

10 volumes:

11 - data:/foo/bar

.autorestic.yml
1locations:

2 hello:

3 from: 'volume:my-data'

4 to:

5 - remote

6 options:

7 forget:

8 keep-last: 14 # Useful for limitations explained belowd

9

10backends:

11 remote: ...

Now you can backup and restore as always.

1autorestic -l hello backup

1autorestic -l hello restore

If the volume does not exist on restore, autorestic will create it for you and then fill it with the data.

linkLimitations

Unfortunately there are some limitations when backing up directly from a docker volume without mounting the volume to the host:

  1. Incremental updates are not possible right now due to how the current docker mounting works. This means that it will take significantely more space.
  2. Exclude patterns and files also do not work as restic only sees a compressed tarball as source and not the actual data.

If you are curious or have ideas how to improve this, please read more here. Any help is welcomed 🙂

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/exclude.html b/docs/location/exclude.html index 2ef8bfb..4675f26 100644 --- a/docs/location/exclude.html +++ b/docs/location/exclude.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkExcluding files

If you want to exclude certain files or folders it done easily by specifiyng the right flags in the location you desire to filter.

The flags are taken straight from the restic cli exclude rules so you can use any flag used there.

1locations:

2 my-location:

3 from: /data

4 to: my-backend

5 options:

6 backup:

7 exclude:

8 - '*.nope'

9 - '*.abc'

10 exclude-file: .gitignore

linkExcluding files

If you want to exclude certain files or folders it done easily by specifiyng the right flags in the location you desire to filter.

The flags are taken straight from the restic cli exclude rules so you can use any flag used there.

1locations:

2 my-location:

3 from: /data

4 to: my-backend

5 options:

6 backup:

7 exclude:

8 - '*.nope'

9 - '*.abc'

10 exclude-file: .gitignore

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/forget.html b/docs/location/forget.html index 946d261..196da80 100644 --- a/docs/location/forget.html +++ b/docs/location/forget.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkForget/Prune Policies

Autorestic supports declaring snapshot policies for location to avoid keeping old snapshot around if you don't need them.

This is based on Restic's snapshots policies, and can be enabled for each location as shown below:

Note This is a full example, of course you also can specify only one of them

.autorestic.yml
1locations:

2 etc:

3 from: /etc

4 to: local

5 options:

6 forget:

7 keep-last: 5 # always keep at least 5 snapshots

8 keep-hourly: 3 # keep 3 last hourly shapshots

9 keep-daily: 4 # keep 4 last daily shapshots

10 keep-weekly: 1 # keep 1 last weekly shapshots

11 keep-monthly: 12 # keep 12 last monthly shapshots

12 keep-yearly: 7 # keep 7 last yearly shapshots

13 keep-within: '2w' # keep snapshots from the last 2 weeks

linkForget/Prune Policies

Autorestic supports declaring snapshot policies for location to avoid keeping old snapshot around if you don't need them.

This is based on Restic's snapshots policies, and can be enabled for each location as shown below:

Note This is a full example, of course you also can specify only one of them

.autorestic.yml
1locations:

2 etc:

3 from: /etc

4 to: local

5 options:

6 forget:

7 keep-last: 5 # always keep at least 5 snapshots

8 keep-hourly: 3 # keep 3 last hourly shapshots

9 keep-daily: 4 # keep 4 last daily shapshots

10 keep-weekly: 1 # keep 1 last weekly shapshots

11 keep-monthly: 12 # keep 12 last monthly shapshots

12 keep-yearly: 7 # keep 7 last yearly shapshots

13 keep-within: '2w' # keep snapshots from the last 2 weeks

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/hooks.html b/docs/location/hooks.html index c293a5d..e71dc6e 100644 --- a/docs/location/hooks.html +++ b/docs/location/hooks.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkHooks

Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.

.autorestic.yml
1locations:

2 my-location:

3 from: /data

4 to: my-backend

5 hooks:

6 before:

7 - echo "Hello"

8 - echo "Human"

9 after:

10 - echo "kthxbye"

linkHooks

Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.

.autorestic.yml
1locations:

2 my-location:

3 from: /data

4 to: my-backend

5 hooks:

6 before:

7 - echo "Hello"

8 - echo "Human"

9 after:

10 - echo "kthxbye"

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/location/overview.html b/docs/location/overview.html index 6ccb64c..76e29c1 100644 --- a/docs/location/overview.html +++ b/docs/location/overview.html @@ -36,7 +36,7 @@ font-family: 'Material Icons Outlined'; }
Star

Created With

link🗂 Locations

Locations can be seen as the input to the backup process. Generally this is simply a folder. -The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.

.autorestic.yml
1locations:

2 my-location-name:

3 from: path/to/backup

4 to:

5 - name-of-backend

6 - also-backup-to-this-backend

linkfrom

This is the source of the location.

linkHow are paths resolved?

Paths can be absolute or relative. If relative they are resolved relative to the location of the config file. Tilde ~ paths are also supported for home folder resolution.

linkto

This is einther a single backend or an array of backends. The backends have to be configured in the same config file.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -60,4 +60,4 @@ The paths can be relative from the config file. A location can have multiple bac Exec Install Uninstall -Update

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/qa.html b/docs/qa.html index 839a59b..7bd1045 100644 --- a/docs/qa.html +++ b/docs/qa.html @@ -36,7 +36,7 @@ font-family: 'Material Icons Outlined'; }
Star

Created With

link❓ QA

linkMy config file was moved?

This happens when autorestic needs to write to the config file. This happend e.g. when we are generating a key for you. -Unfortunately during this process formatting and comments are lost. That is why autorestic will place a copy of your old config next to the one we are writing to.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -60,4 +60,4 @@ Unfortunately during this process formatting and comments are lost. That is why Exec Install Uninstall -Update

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/quick.html b/docs/quick.html index f8bfd7a..096d41b 100644 --- a/docs/quick.html +++ b/docs/quick.html @@ -35,7 +35,7 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🚀 Quickstart

linkInstallation

1curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash

linkWrite a simple config file

1vim .autorestic.yml

For a quick overview:

.autorestic.yml
1locations:

2 home:

3 from: /home/me

4 to: remote

5

6 important:

7 from: /path/to/important/stuff

8 to:

9 - remote

10 - hdd

11

12backends:

13 remote:

14 type: s3

15 path: 's3.amazonaws.com/bucket_name'

16 AWS_ACCESS_KEY_ID: account_id

17 AWS_SECRET_ACCESS_KEY: account_key

18

19 hdd:

20 type: local

21 path: /mnt/my_external_storage

linkCheck

1autorestic check -a

This checks if the config file has any issues. If this is the first time this can take longer as autorestic will setup the backends.

Now is good time to backup the config. After you run autorestic at least once we will add the generated encryption keys to the config.

linkBackup

1autorestic backup -a

This will do a backup of all locations.

linkRestore

1autorestic restore -l home --from hdd --to /path/where/to/restore

This will restore the location home from the backend hdd to the given path.

link🚀 Quickstart

linkInstallation

1curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash

linkWrite a simple config file

1vim .autorestic.yml

For a quick overview:

  • locations can be seen as the inputs and backends the output where the data is stored and backed up.
  • One location can have one or multiple backends for redudancy.
  • One backend can also be the target for multiple locations.
  • Backup the config file as it will contain the generated keys. If you don't have a copy of that keys, the backups are useless as they are encrypted and data will be not recoverable.
.autorestic.yml
1locations:

2 home:

3 from: /home/me

4 to: remote

5

6 important:

7 from: /path/to/important/stuff

8 to:

9 - remote

10 - hdd

11

12backends:

13 remote:

14 type: s3

15 path: 's3.amazonaws.com/bucket_name'

16 AWS_ACCESS_KEY_ID: account_id

17 AWS_SECRET_ACCESS_KEY: account_key

18

19 hdd:

20 type: local

21 path: /mnt/my_external_storage

linkCheck

1autorestic check -a

This checks if the config file has any issues. If this is the first time this can take longer as autorestic will setup the backends.

Now is good time to backup the config. After you run autorestic at least once we will add the generated encryption keys to the config.

linkBackup

1autorestic backup -a

This will do a backup of all locations.

linkRestore

1autorestic restore -l home --from hdd --to /path/where/to/restore

This will restore the location home from the backend hdd to the given path.

Home Quick Start Installation -Configuration

Locationschevron_right

Overview +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file +Update

Examples

QA

Contributors

\ No newline at end of file