From a3ba7b1dff6148174090b614ea5e26294350fdef Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sat, 13 Feb 2021 23:54:12 +0100 Subject: [PATCH] Use B2 instead of Mega --- nas.org | 81 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/nas.org b/nas.org index 5991656..979b8cd 100644 --- a/nas.org +++ b/nas.org @@ -526,37 +526,6 @@ services: url: "http://192.168.1.56/" #+end_src -** =restic= - Automatic online backups -#+begin_src yaml - restic: - container_name: restic - image: mazzolino/restic - restart: "no" - networks: - - t2_proxy - environment: - - RUN_ON_STARTUP=true - - BACKUP_CRON=0 30 0 * * * - - RESTIC_REPOSITORY=rclone:mega:mega - - RESTIC_PASSWORD="$RESTIC_PASSWORD" - - RESTIC_BACKUP_SOURCES=/data - - RESTIC_FORGET_ARGS=--keep-daily 7 --keep-weekly 4 --keep-monthly 12 - - UID=$PUID - - GID=$PGID - - TZ=$TZ - volumes: - - $CONFIGDIR/restic:/root/.config/rclone - - /srv/storage/Cloud/thesis:/data/thesis -#+end_src - -*** =rclone.conf= -#+begin_src conf :tangle /ssh:thomas@grenoble:~/docker/config/restic/rclone.conf :noweb yes -[mega] -type = mega -user = dehaeze.thomas@gmail.com -pass = <> -#+end_src - ** =snapraid= - Manage local backup with parity disk #+begin_src yaml snapraid: @@ -1266,7 +1235,53 @@ split=16 - "traefik.http.services.linkding-svc.loadbalancer.server.port=9090" #+end_src +** =restic= - Automatic online backups +#+begin_src yaml + restic: + container_name: restic + image: mazzolino/restic + restart: "no" + networks: + - t2_proxy + environment: + - BACKUP_CRON=0 30 0 * * * + - RESTIC_REPOSITORY=b2:tdehaeze:/restic + - RESTIC_PASSWORD=$RESTIC_PASSWORD + - RESTIC_BACKUP_SOURCES=/source + - RESTIC_FORGET_ARGS=--keep-daily 7 --keep-weekly 4 --keep-monthly 12 + - B2_ACCOUNT_ID=$RESTIC_B2_ACCOUNT_ID + - B2_ACCOUNT_KEY=$RESTIC_B2_ACCOUNT_KEY + - UID=$PUID + - GID=$PGID + - TZ=$TZ + volumes: + - /srv/storage/Cloud/thesis:/source/Cloud/thesis:ro +#+end_src + * Docker-Compose OLD :noexport: +** =duplicity= - Bookmark manager +#+begin_src yaml + duplicity: + container_name: duplicity + image: tecnativa/duplicity + restart: unless-stopped + networks: + - t2_proxy + environment: + - TZ=$TZ + - DST=megav2://mega@mega.nz/backup + volumes: + - $CONFIGDIR/duplicity/.megav2rc:/root/.megav2rc + - /srv/storage/Cloud/thesis:/mnt/backup/src/thesis:ro +#+end_src + +*** =.megarc= +#+begin_src conf :tangle /ssh:thomas@grenoble:~/docker/config/duplicity/.megav2rc :noweb yes +[Login] +user = dehaeze.thomas@gmail.com +pass = <> +#+end_src + ** Transfer.sh #+begin_src yaml transfer: @@ -1974,7 +1989,7 @@ split=16 * =.env= - Variable used for Docker Compose :PROPERTIES: -:header-args: :tangle /ssh:thomas@grenoble:~/docker/.env.test +:header-args: :tangle /ssh:thomas@grenoble:~/docker/.env :header-args+: :comments none :mkdirp yes :noweb yes :END: @@ -1999,6 +2014,8 @@ MINIFLUX_POSTGRES_PASSWORD=<> +RESTIC_B2_ACCOUNT_ID=<> +RESTIC_B2_ACCOUNT_KEY=<> #+end_src #+begin_src conf