diff --git a/docs/backend/available.html b/docs/backend/available.html index 7e73578..8efbeb5 100644 --- a/docs/backend/available.html +++ b/docs/backend/available.html @@ -35,16 +35,22 @@ .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

Available BackendsLocalBackblazeS3 / MinioSFTP

Home +

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

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 bcf3a3c..6b97c32 100644 --- a/docs/backend/overview.html +++ b/docs/backend/overview.html @@ -35,16 +35,22 @@ .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.

💽 BackendsTypes

Home +

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 8c7947f..d9a48ca 100644 --- a/docs/cli/backup.html +++ b/docs/cli/backup.html @@ -35,16 +35,22 @@ .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

Backup

Home +

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 ab0a814..7e757df 100644 --- a/docs/cli/check.html +++ b/docs/cli/check.html @@ -35,16 +35,22 @@ .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

check

Home +

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 2a2e5f9..75386ba 100644 --- a/docs/cli/cron.html +++ b/docs/cli/cron.html @@ -35,16 +35,22 @@ .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.

Cron

Home +

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 c4a20dd..999872f 100644 --- a/docs/cli/exec.html +++ b/docs/cli/exec.html @@ -35,16 +35,22 @@ .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.

Exec

Home +

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 ad50849..23e48d5 100644 --- a/docs/cli/forget.html +++ b/docs/cli/forget.html @@ -35,16 +35,22 @@ .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.

Forget

Home +

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 804cae2..9023764 100644 --- a/docs/cli/info.html +++ b/docs/cli/info.html @@ -36,16 +36,22 @@ 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

infoWith a custom file

Home +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 @@ -54,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 68d6f52..f127f21 100644 --- a/docs/cli/install.html +++ b/docs/cli/install.html @@ -35,16 +35,22 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkInstall

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

1autorestic install

Install

Home +

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 75bf70d..999d266 100644 --- a/docs/cli/restore.html +++ b/docs/cli/restore.html @@ -35,16 +35,22 @@ .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

RestoreExample

Home +

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 a262296..e8206dd 100644 --- a/docs/cli/uninstall.html +++ b/docs/cli/uninstall.html @@ -35,16 +35,22 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkUninstall

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

1autorestic uninstall

Uninstall

Home +

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 b362117..2446d6a 100644 --- a/docs/cli/update.html +++ b/docs/cli/update.html @@ -35,16 +35,22 @@ .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.

Update

Home +

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 8c9fc34..2a51787 100644 --- a/docs/config.html +++ b/docs/config.html @@ -35,16 +35,22 @@ .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

🎛 Config FilePathExample configuration

Home +

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 b5ea7bd..95a30d6 100644 --- a/docs/contrib.html +++ b/docs/contrib.html @@ -35,16 +35,22 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🙋‍♀️🙋‍♂️ Contributors

This amazing people helped the project!

🙋‍♀️🙋‍♂️ Contributors

Home +

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 bc554a8..2d885a5 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -35,16 +35,22 @@ .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

🐣 ExamplesList all the snapshots for all the backendsUnlock a locked repository

Home +

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 52e45a1..b136098 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,16 +37,22 @@ }
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 difficoult 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

autorestic✈️ Roadmap🌈 Features

Home +

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 612dd66..ab878b9 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -35,16 +35,22 @@ .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

🛳 Installation

Home +

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 dc1064d..cb22874 100644 --- a/docs/location/cron.html +++ b/docs/location/cron.html @@ -35,16 +35,22 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
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

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.

10 * * * * /usr/local/bin/autorestic -c /srv/.autorestic.yml

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

CronInstalling the cronCrontab

Home +

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

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.

10 * * * * /usr/local/bin/autorestic -c /srv/.autorestic.yml

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

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 7023ffc..c8f6df7 100644 --- a/docs/location/docker.html +++ b/docs/location/docker.html @@ -35,16 +35,22 @@ .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 🙂

DockerLimitations

Home +

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 505dc2f..baf84c0 100644 --- a/docs/location/exclude.html +++ b/docs/location/exclude.html @@ -35,16 +35,22 @@ .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

Excluding files

Home +

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 98803fa..e0ef650 100644 --- a/docs/location/forget.html +++ b/docs/location/forget.html @@ -35,16 +35,22 @@ .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

Forget/Prune Policies

Home +

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 b57db35..32acdef 100644 --- a/docs/location/hooks.html +++ b/docs/location/hooks.html @@ -35,16 +35,22 @@ .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"

Hooks

Home +

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 19a5e03..a7124d8 100644 --- a/docs/location/overview.html +++ b/docs/location/overview.html @@ -36,16 +36,22 @@ 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.

🗂 LocationsfromHow are paths resolved?to

Home +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 @@ -54,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 2257ae8..e9d256c 100644 --- a/docs/qa.html +++ b/docs/qa.html @@ -36,16 +36,22 @@ 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. -Unforunately 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.

❓ QAMy config file was moved?

Home +Unforunately 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 @@ -54,4 +60,4 @@ Unforunately during this process formatting and comments are lost. That is why a 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 1e08540..a4d0038 100644 --- a/docs/quick.html +++ b/docs/quick.html @@ -35,16 +35,22 @@ .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 [Optional]

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.

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.

🚀 QuickstartInstallationWrite a simple config fileCheck [Optional]BackupRestore

Home +

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
.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 [Optional]

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.

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