From 0ae374cd450a387aaf3f7088456ba268e43829d9 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:35:46 +0100 Subject: [PATCH] docs --- docs/markdown/_toc.md | 5 +++ docs/markdown/location/docker.md | 12 ++---- .../{upgrade.md => migration/0.x_1.0.md} | 4 +- docs/markdown/migration/1.4_1.5.md | 39 +++++++++++++++++++ 4 files changed, 49 insertions(+), 11 deletions(-) rename docs/markdown/{upgrade.md => migration/0.x_1.0.md} (94%) create mode 100644 docs/markdown/migration/1.4_1.5.md diff --git a/docs/markdown/_toc.md b/docs/markdown/_toc.md index 600055a..bd4e321 100644 --- a/docs/markdown/_toc.md +++ b/docs/markdown/_toc.md @@ -40,6 +40,11 @@ > [Uninstall](/cli/uninstall) > [Upgrade](/cli/upgrade) +> :Collapse label=Migration +> +> [0.x → 1.0](/migration/0.x_1.0) +> [1.4 → 1.5](/migration/1.4_1.5) + [Examples](/examples) [QA](/qa) [Community](/community) diff --git a/docs/markdown/location/docker.md b/docs/markdown/location/docker.md index 3223779..5498dd0 100644 --- a/docs/markdown/location/docker.md +++ b/docs/markdown/location/docker.md @@ -3,7 +3,7 @@ autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem. ```yaml | docker-compose.yml -version: '3.7' +version: '3.8' volumes: data: @@ -18,13 +18,9 @@ services: ```yaml | .autorestic.yml locations: - - name: hello - from: volume:my-data - to: - - remote - -backends: - - name: remote + foo: + from: my-data + type: volume # ... ``` diff --git a/docs/markdown/upgrade.md b/docs/markdown/migration/0.x_1.0.md similarity index 94% rename from docs/markdown/upgrade.md rename to docs/markdown/migration/0.x_1.0.md index 72d79ab..252922d 100644 --- a/docs/markdown/upgrade.md +++ b/docs/markdown/migration/0.x_1.0.md @@ -1,6 +1,4 @@ -# Upgrade - -## From `0.x` to `1.0` +# From `0.x` to `1.0` Most of the config file is remained compatible, however to clean up the backends custom environment variables were moved from the root object to an `env` object. diff --git a/docs/markdown/migration/1.4_1.5.md b/docs/markdown/migration/1.4_1.5.md new file mode 100644 index 0000000..dd74424 --- /dev/null +++ b/docs/markdown/migration/1.4_1.5.md @@ -0,0 +1,39 @@ +# Migration from `1.4` to `1.5` + +## Hooks + +Since `1.5` multiple sources for a location are possible. +For this reason, while before hooks where executed in the folder of the source, now they are executed in the directory of the config `.autorestic.yaml`. + +You can overwrite this behavior with the new `dir` option in the hook section of the config. + +```yaml +locations: + l1: + # ... + from: /foo/bar + hooks: + dir: /foo/bar + before: pwd +``` + +## Docker volumes + +The syntax with docker volumes has changed and needs to be adjusted. + +```yaml +# Before +locations: + foo: + from: volume:my-data +``` + +```yaml +# After +locations: + foo: + from: my-data + type: volume +``` + +> :ToCPrevNext