diff --git a/README.md b/README.md index 396ab2d..1da8890 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,10 @@ The backup is executed by a cronjob that is specified in the `docker-compose-bac You must specify the project by prepending the command with `COMPOSE_PROJECT_NAME=$projectname `. Having a project name set, prefixes all container and volume names, such that it can run beside _prod_. - *Example: * `./oberdocker-restore.sh -p restore up` + +*Example: * `./oberdocker-restore.sh -p restore up` +- - If you choose it different from 'oberdocker', the recovery is done on separate volumes and a parallel project is starter afterwards, where you can analyse the backup. -- If you choose it 'oberdocker', the recovery will be done for the relevant (productive) volumes. This will overwrite the data there. \ No newline at end of file +- If you choose it 'oberdocker', the recovery will be done for the relevant (productive) volumes. This will overwrite the data there. +- To restore a specific Time in the past, you can add the option -t see [https://duplicity.nongnu.org/vers7/duplicity.1.html#sect8] \ No newline at end of file diff --git a/docker-compose-restore.yml b/docker-compose-restore.yml index 5e4e130..a631c62 100644 --- a/docker-compose-restore.yml +++ b/docker-compose-restore.yml @@ -2,7 +2,7 @@ version: '3.2' services: restore: - build: ./volumerize + image: blacklabelops/volumerize:1.7.1 container_name: restore environment: - VOLUMERIZE_SOURCE=/source @@ -12,8 +12,14 @@ services: - TZ=Europe/Berlin - AWS_ACCESS_KEY_ID= ${BACKUP_AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY=${BACKUP_AWS_SECRET_ACCESS_KEY} - - VOLUMERIZE_DUPLICITY_OPTIONS=--file-prefix-archive=archive- + - VOLUMERIZE_DUPLICITY_OPTIONS=--file-prefix-archive=archive- --verbosity=INFO --s3-use-new-style --s3-multipart-chunk-size 50 volumes: - - /var/run/docker.sock:/var/run/docker.sock - - db:/source/db - - nextcloud:/source/nextcloud \ No newline at end of file + - type: bind + source: /var/run/docker.sock + target: /var/run/docker.sock + - type: volume + source: db + target: /source/db + - type: volume + source: nextcloud + target: /source/nextcloud \ No newline at end of file diff --git a/oberdocker-restore.sh b/oberdocker-restore.sh index 6853542..caf4ef9 100755 --- a/oberdocker-restore.sh +++ b/oberdocker-restore.sh @@ -21,7 +21,7 @@ if [[ $COMPOSE_PROJECT_NAME = "oberdocker" ]] ; then exit 0 fi else - echo The compose project name is set to '$COMPOSE_PROJECT_NAME'. + echo The compose project name is set to $COMPOSE_PROJECT_NAME. echo The data will be written to volumes prefixed with $COMPOSE_PROJECT_NAME read -p "Should we proceed? Y or N?: " -n 1 -r echo @@ -33,7 +33,7 @@ fi NO_RESTORE=false docker-compose \ --file docker-compose.yml \ --file docker-compose-backup.yml \ - run volumerize restore || exit 1 + run volumerize restore $@ || exit 1 if [[ $COMPOSE_PROJECT_NAME = "oberdocker" ]]; then