From 05077be0fba4111406e39cc52656cec55d22b729 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Mon, 9 May 2022 10:25:59 +0200 Subject: [PATCH] Add second restic instance for offline backup --- homelab.org | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/homelab.org b/homelab.org index b84723d..606dbc8 100644 --- a/homelab.org +++ b/homelab.org @@ -1230,7 +1230,7 @@ services: - name: "OpenWRT" logo: "/assets/tools/openwrt.png" subtitle: "Router" - url: "http://192.168.1.1/" + url: "https://openwrt.tdehaeze.xyz/" - name: "Home Assistant" logo: "/assets/tools/homeassistant.png" subtitle: "Home Assistant" @@ -2007,10 +2007,10 @@ filesystem_folder = /data/collections logging: *default-logging #+end_src -*** =restic= - Automatic online backups ([[https://github.com/djmaze/resticker/][link]]) +*** =restic-b2= - Automatic backups on BackBlaze ([[https://github.com/djmaze/resticker/][link]]) #+begin_src yaml - restic: - container_name: restic + restic-b2: + container_name: restic-b2 image: mazzolino/restic restart: unless-stopped networks: @@ -2027,8 +2027,9 @@ filesystem_folder = /data/collections - UID=$PUID - GID=$PGID - TZ=$TZ + - POST_COMMANDS_FAILURE=curl "https://gotify.tdehaeze.xyz/message?token=$RESTIC_GOTIFY_TOKEN" -F "title=Restic B2" -F "message=Backup failed" -F "priority=5" volumes: - - $CONFIGDIR/restic/exclude.txt:/exclude.txt:ro + - $CONFIGDIR/restic-b2/exclude.txt:/exclude.txt:ro - /srv/storage/Cloud/thesis:/source/Cloud/thesis:ro - /home/thomas/docker:/source/docker:ro logging: *default-logging @@ -2036,7 +2037,7 @@ filesystem_folder = /data/collections =exclude.txt= - Exclude files -#+begin_src conf :tangle /ssh:thomas@homelab:~/docker/config/restic/exclude.txt +#+begin_src conf :tangle /ssh:thomas@homelab:~/docker/config/restic-b2/exclude.txt *.db *.log *.log.* @@ -2050,6 +2051,42 @@ filesystem_folder = /data/collections /source/docker/config/web/www/ #+end_src +*** =restic-aouste= - Automatic backups on Raspberry ([[https://github.com/djmaze/resticker/][link]]) +#+begin_src yaml + restic-aouste: + container_name: restic-aouste + image: mazzolino/restic + restart: unless-stopped + networks: + - t2_proxy + environment: + - BACKUP_CRON=0 30 3 * * * + - RESTIC_REPOSITORY=sftp:thomas@192.168.1.22:/hdd/backup + - RESTIC_PASSWORD=$RESTIC_PASSWORD + - RESTIC_BACKUP_SOURCES=/source + - RESTIC_FORGET_ARGS=--group-by tag --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune + - RESTIC_BACKUP_ARGS=--tag local --exclude-file /exclude.txt + - UID=$PUID + - GID=$PGID + - TZ=$TZ + - POST_COMMANDS_FAILURE=curl "https://gotify.tdehaeze.xyz/message?token=AoWn1nAMGoCE0om" -F "title=Restic Aouste" -F "message=Backup failed" -F "priority=5" + volumes: + - $CONFIGDIR/restic-aouste/exclude.txt:/exclude.txt:ro + - /srv/storage/Users:/source/Users:ro + - /home/thomas/.ssh/known_hosts:/root/.ssh/known_hosts:ro + - /home/thomas/.ssh/id_rsa:/root/.ssh/id_rsa:ro + + logging: *default-logging +#+end_src + +=exclude.txt= - Exclude files + +#+begin_src conf :tangle /ssh:thomas@homelab:~/docker/config/restic-aouste/exclude.txt +*.db +*.log +*.log.* +#+end_src + *** =miniflux= - RSS reader ([[https://hub.docker.com/r/miniflux/miniflux][link]]) #+begin_src yaml miniflux: