From 885c7ca778cc02632f5547ab37ce08fd13e62ba0 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 17 May 2020 15:30:23 +0200 Subject: [PATCH] finished docs --- docs/backend/available.html | 56 ++++++++++++++++++++ docs/backend/overview.html | 56 ++++++++++++++++++++ docs/backends/overview.html | 56 ++++++++++++++++++++ docs/cli/backup.html | 18 +++---- docs/cli/check.html | 18 +++---- docs/cli/cron.html | 18 +++---- docs/cli/exec.html | 18 +++---- docs/cli/forget.html | 18 +++---- docs/cli/info.html | 18 +++---- docs/cli/install.html | 18 +++---- docs/cli/restore.html | 18 +++---- docs/cli/uninstall.html | 18 +++---- docs/cli/update.html | 18 +++---- docs/config.html | 18 +++---- docs/contrib.html | 18 +++---- docs/examples.html | 18 +++---- docs/index.html | 18 +++---- docs/installation.html | 18 +++---- docs/{locations => location}/cron.html | 18 +++---- docs/{locations => location}/docker.html | 18 +++---- docs/{locations => location}/exclude.html | 18 +++---- docs/{locations => location}/forget.html | 18 +++---- docs/{locations => location}/hooks.html | 18 +++---- docs/{locations => location}/overview.html | 18 +++---- docs/locations/types.html | 57 --------------------- docs/md/_toc.md | 12 ++--- docs/md/backend/available.md | 51 ++++++++++++++++++ docs/md/backend/overview.md | 16 ++++++ docs/md/{locations => location}/cron.md | 0 docs/md/{locations => location}/docker.md | 0 docs/md/{locations => location}/exclude.md | 0 docs/md/{locations => location}/forget.md | 0 docs/md/{locations => location}/hooks.md | 0 docs/md/{locations => location}/overview.md | 0 docs/qa.html | 18 +++---- docs/quick.html | 18 +++---- package.json | 55 ++++++++++---------- 37 files changed, 476 insertions(+), 297 deletions(-) create mode 100644 docs/backend/available.html create mode 100644 docs/backend/overview.html create mode 100644 docs/backends/overview.html rename docs/{locations => location}/cron.html (82%) rename docs/{locations => location}/docker.html (87%) rename docs/{locations => location}/exclude.html (84%) rename docs/{locations => location}/forget.html (85%) rename docs/{locations => location}/hooks.html (83%) rename docs/{locations => location}/overview.html (84%) delete mode 100644 docs/locations/types.html create mode 100644 docs/md/backend/available.md create mode 100644 docs/md/backend/overview.md rename docs/md/{locations => location}/cron.md (100%) rename docs/md/{locations => location}/docker.md (100%) rename docs/md/{locations => location}/exclude.md (100%) rename docs/md/{locations => location}/forget.md (100%) rename docs/md/{locations => location}/hooks.md (100%) rename docs/md/{locations => location}/overview.md (100%) diff --git a/docs/backend/available.html b/docs/backend/available.html new file mode 100644 index 0000000..438ff08 --- /dev/null +++ b/docs/backend/available.html @@ -0,0 +1,56 @@ +Autorestic | Available Backends
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

Home +Quick Start +Installation +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/backend/overview.html b/docs/backend/overview.html new file mode 100644 index 0000000..6f90954 --- /dev/null +++ b/docs/backend/overview.html @@ -0,0 +1,56 @@ +Autorestic | 💽 Backends
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.

Home +Quick Start +Installation +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/backends/overview.html b/docs/backends/overview.html new file mode 100644 index 0000000..c28fbc1 --- /dev/null +++ b/docs/backends/overview.html @@ -0,0 +1,56 @@ +Autorestic | Backends
Star

Created With

linkBackends

Home +Quick Start +Installation +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/cli/backup.html b/docs/cli/backup.html index 660f414..a5e998a 100644 --- a/docs/cli/backup.html +++ b/docs/cli/backup.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 2322368..b6e2948 100644 --- a/docs/cli/check.html +++ b/docs/cli/check.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 f560736..7c50c29 100644 --- a/docs/cli/cron.html +++ b/docs/cli/cron.html @@ -35,16 +35,16 @@ .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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 7e93d53..4e3baa5 100644 --- a/docs/cli/exec.html +++ b/docs/cli/exec.html @@ -35,16 +35,16 @@ .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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 3a2a473..d3a15d9 100644 --- a/docs/cli/forget.html +++ b/docs/cli/forget.html @@ -35,16 +35,16 @@ .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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 bb6575e..ec5ac6b 100644 --- a/docs/cli/info.html +++ b/docs/cli/info.html @@ -36,16 +36,16 @@ 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 +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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -54,4 +54,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 8542aab..2308a67 100644 --- a/docs/cli/install.html +++ b/docs/cli/install.html @@ -35,16 +35,16 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkInstall

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

1autorestic install

Home +

linkInstall

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

1autorestic install

Home Quick Start Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 158eb48..0b6fa97 100644 --- a/docs/cli/restore.html +++ b/docs/cli/restore.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

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

Created With

linkUninstall

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

1autorestic uninstall

Home +

linkUninstall

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

1autorestic uninstall

Home Quick Start Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 b596633..4ecb06b 100644 --- a/docs/cli/update.html +++ b/docs/cli/update.html @@ -35,16 +35,16 @@ .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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 f23b8ff..8b946e5 100644 --- a/docs/config.html +++ b/docs/config.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 372e860..2acd6a7 100644 --- a/docs/contrib.html +++ b/docs/contrib.html @@ -35,16 +35,16 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

link🙋‍♀️🙋‍♂️ Contributors

This amazing people helped the project!

Home +

link🙋‍♀️🙋‍♂️ Contributors

This amazing people helped the project!

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

Home Quick Start Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 26fd2c8..50be590 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 ae3907a..ec377b0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,16 +37,16 @@ }
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 :)

link🌈 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 :)

link🌈 Features

  • YAML config files, no CLI
  • Predictable
  • Incremental -> Minimal space is used
  • Backup locations to multiple backends
  • Snapshot policies and pruning
  • Simple interface
  • Fully encrypted
  • Pre/After hooks
  • Exclude pattern/files
  • Backup & Restore docker volumes
  • Seamless cron jobs for automatic backup in development.

Home Quick Start Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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 02192a3..7c69f17 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/cron.html b/docs/location/cron.html similarity index 82% rename from docs/locations/cron.html rename to docs/location/cron.html index 3f37edf..18a2b9f 100644 --- a/docs/locations/cron.html +++ b/docs/location/cron.html @@ -35,16 +35,16 @@ .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.

.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

Home +

linkCron

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

.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

Home Quick Start Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/docker.html b/docs/location/docker.html similarity index 87% rename from docs/locations/docker.html rename to docs/location/docker.html index 7498212..7c9bb88 100644 --- a/docs/locations/docker.html +++ b/docs/location/docker.html @@ -35,16 +35,16 @@ .icon-font.outline { font-family: 'Material Icons Outlined'; } -
Star

Created With

linkDocker

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
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 +

linkDocker

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
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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/exclude.html b/docs/location/exclude.html similarity index 84% rename from docs/locations/exclude.html rename to docs/location/exclude.html index 1906df4..2b407d4 100644 --- a/docs/locations/exclude.html +++ b/docs/location/exclude.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/forget.html b/docs/location/forget.html similarity index 85% rename from docs/locations/forget.html rename to docs/location/forget.html index cc58f40..d90c2e4 100644 --- a/docs/locations/forget.html +++ b/docs/location/forget.html @@ -35,16 +35,16 @@ .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

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/hooks.html b/docs/location/hooks.html similarity index 83% rename from docs/locations/hooks.html rename to docs/location/hooks.html index 31daa83..9ed7c40 100644 --- a/docs/locations/hooks.html +++ b/docs/location/hooks.html @@ -35,16 +35,16 @@ .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"

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/locations/overview.html b/docs/location/overview.html similarity index 84% rename from docs/locations/overview.html rename to docs/location/overview.html index 8481b7f..2a2d26b 100644 --- a/docs/locations/overview.html +++ b/docs/location/overview.html @@ -36,16 +36,16 @@ 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 +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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -54,4 +54,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/locations/types.html b/docs/locations/types.html deleted file mode 100644 index c709021..0000000 --- a/docs/locations/types.html +++ /dev/null @@ -1,57 +0,0 @@ -Autorestic
Star

Created With

Home -Quick Start -Installation -Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Examples

QA

Contributors

\ No newline at end of file diff --git a/docs/md/_toc.md b/docs/md/_toc.md index 29563cb..4e33475 100644 --- a/docs/md/_toc.md +++ b/docs/md/_toc.md @@ -5,12 +5,12 @@ > :Collapse label=Locations > -> [Overview](/locations/overview) -> [Hooks](/locations/hooks) -> [Exluding Files](/locations/exclude) -> [Forget Policy](/locations/forget) -> [Cron](/locations/cron) -> [Docker Volumes](/locations/docker) +> [Overview](/location/overview) +> [Hooks](/location/hooks) +> [Exluding Files](/location/exclude) +> [Forget Policy](/location/forget) +> [Cron](/location/cron) +> [Docker Volumes](/location/docker) > :Collapse label=Backend > diff --git a/docs/md/backend/available.md b/docs/md/backend/available.md new file mode 100644 index 0000000..f911f15 --- /dev/null +++ b/docs/md/backend/available.md @@ -0,0 +1,51 @@ +# Available Backends + +In theory [all the restic backends](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html) are supported. + +Those tested are the following: + +## Local + +```yaml +backends: + name-of-backend: + type: local + path: /data/my/backups +``` + +## Backblaze + +```yaml +backends: + name-of-backend: + type: b2 + path: 'myAccount:myBucket/my/path' + B2_ACCOUNT_ID: backblaze_account_id + B2_ACCOUNT_KEY: backblaze_account_key +``` + +## 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 +``` + +## SFTP + +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](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#sftp) on the matter. + +```yaml +backends: + name-of-backend: + type: sftp + path: my-host:/remote/path/on/the/server +``` + +> :ToCPrevNext diff --git a/docs/md/backend/overview.md b/docs/md/backend/overview.md new file mode 100644 index 0000000..0f0baa5 --- /dev/null +++ b/docs/md/backend/overview.md @@ -0,0 +1,16 @@ +# 💽 Backends + +Backends are the ouputs of the backup process. Each location needs at least one. + +```yaml | .autorestic.yml +backends: + name-of-backend: + type: local + path: /data/my/backups +``` + +## Types + +We restic supports multiple types of backends. See the [full list](/backend/available) for details. + +> :ToCPrevNext diff --git a/docs/md/locations/cron.md b/docs/md/location/cron.md similarity index 100% rename from docs/md/locations/cron.md rename to docs/md/location/cron.md diff --git a/docs/md/locations/docker.md b/docs/md/location/docker.md similarity index 100% rename from docs/md/locations/docker.md rename to docs/md/location/docker.md diff --git a/docs/md/locations/exclude.md b/docs/md/location/exclude.md similarity index 100% rename from docs/md/locations/exclude.md rename to docs/md/location/exclude.md diff --git a/docs/md/locations/forget.md b/docs/md/location/forget.md similarity index 100% rename from docs/md/locations/forget.md rename to docs/md/location/forget.md diff --git a/docs/md/locations/hooks.md b/docs/md/location/hooks.md similarity index 100% rename from docs/md/locations/hooks.md rename to docs/md/location/hooks.md diff --git a/docs/md/locations/overview.md b/docs/md/location/overview.md similarity index 100% rename from docs/md/locations/overview.md rename to docs/md/location/overview.md diff --git a/docs/qa.html b/docs/qa.html index efd4e39..4bab31b 100644 --- a/docs/qa.html +++ b/docs/qa.html @@ -36,16 +36,16 @@ 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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_right
Backendchevron_right
CLIchevron_right

Info Check Backup Restore @@ -54,4 +54,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 ea19e10..53df890 100644 --- a/docs/quick.html +++ b/docs/quick.html @@ -35,16 +35,16 @@ .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.

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
Backendchevron_right
CLIchevron_right

Info +Configuration

Locationschevron_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/package.json b/package.json index 64dfa12..ae979a7 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,30 @@ { - "private": true, - "scripts": { - "build": "tsc", - "build:watch": "tsc -w", - "dev": "tsnd --no-notify --respawn ./src/autorestic.ts", - "move": "mv bin/autorestic-linux bin/autorestic_linux_x64 && mv bin/autorestic-macos bin/autorestic_macos_x64", - "bin": "yarn run build && pkg lib/autorestic.js --targets latest-macos-x64,latest-linux-x64 --out-path bin && yarn run move", - "docs:build": "codedoc build" - }, - "devDependencies": { - "@codedoc/cli": "^0.1.4", - "@types/js-yaml": "^3.12.1", - "@types/minimist": "^1.2.0", - "@types/node": "^12.11.7", - "pkg": "^4.4.0", - "ts-node-dev": "^1.0.0-pre.40", - "typescript": "^3.7" - }, - "dependencies": { - "axios": "^0.19.0", - "clitastic": "0.0.1", - "colors": "^1.3.3", - "cron-parser": "^2.13.0", - "js-yaml": "^3.13.1", - "minimist": "^1.2.0", - "uhrwerk": "^1.0.0" - } + "private": true, + "scripts": { + "build": "tsc", + "build:watch": "tsc -w", + "dev": "tsnd --no-notify --respawn ./src/autorestic.ts", + "move": "mv bin/autorestic-linux bin/autorestic_linux_x64 && mv bin/autorestic-macos bin/autorestic_macos_x64", + "bin": "yarn run build && pkg lib/autorestic.js --targets latest-macos-x64,latest-linux-x64 --out-path bin && yarn run move", + "docs:build": "codedoc build", + "docs:dev": "codedoc serve" + }, + "devDependencies": { + "@codedoc/cli": "^0.1.4", + "@types/js-yaml": "^3.12.1", + "@types/minimist": "^1.2.0", + "@types/node": "^12.11.7", + "pkg": "^4.4.0", + "ts-node-dev": "^1.0.0-pre.40", + "typescript": "^3.7" + }, + "dependencies": { + "axios": "^0.19.0", + "clitastic": "0.0.1", + "colors": "^1.3.3", + "cron-parser": "^2.13.0", + "js-yaml": "^3.13.1", + "minimist": "^1.2.0", + "uhrwerk": "^1.0.0" + } }