check borgmatic and rsnapshot configurations

This commit is contained in:
2024-11-25 14:56:53 +01:00
parent f005feb7fb
commit c11b75a046
13 changed files with 33 additions and 30 deletions

View File

@@ -3,6 +3,7 @@ location:
- /remote/server/bram
repositories:
- /repo/bram
storage:
encryption_passcommand: cat /keys/bram.key
compression: lz4

View File

@@ -104,7 +104,7 @@ storage:
# archives with a different archive name format.
archive_name_format: '{hostname}-documents-{now}'
unknown_unencrypted_repo_access_is_ok: true
unknown_unencrypted_repo_access_is_ok: true
# Retention policy for how many backups to keep in each category. See
# https://borgbackup.readthedocs.org/en/stable/usage.html#borg-prune for details.

View File

@@ -3,9 +3,11 @@ location:
- /shuttle/etc
repositories:
- /repo/etc
storage:
compression: lz4
archive_name_format: '{now:%Y-%m-%d}'
unknown_unencrypted_repo_access_is_ok: true
retention:
keep_daily: 7

View File

@@ -6,9 +6,11 @@ location:
- '- /shuttle/home/*/.cache'
repositories:
- /repo/home
storage:
compression: lz4
archive_name_format: '{now:%Y-%m-%d}'
unknown_unencrypted_repo_access_is_ok: true
retention:
keep_daily: 7

View File

@@ -9,9 +9,11 @@ location:
- '- /shuttle/opt/openvpn-server/*.log'
repositories:
- /repo/opt
storage:
compression: lz4
archive_name_format: '{now:%Y-%m-%d}'
unknown_unencrypted_repo_access_is_ok: true
retention:
keep_daily: 7

View File

@@ -5,9 +5,11 @@ location:
- '- /shuttle/root/.cache'
repositories:
- /repo/root
storage:
compression: lz4
archive_name_format: '{now:%Y-%m-%d}'
unknown_unencrypted_repo_access_is_ok: true
retention:
keep_daily: 7

View File

@@ -2,7 +2,7 @@
/usr/bin/borgmatic --stats -v 0 -c /config/root.yaml >> /log/root.log 2>&1
/usr/bin/borgmatic --stats -v 0 -c /config/opt.yaml >> /log/opt.log 2>&1
/usr/bin/borgmatic --stats -v 0 -c /config/etc.yaml >> /log/etc.log 2>&1
#/usr/bin/borgmatic --stats -v 0 -c /config/argenta.yaml >> /log/argenta.log 2>&1
export REMOTE=/remote/server/bram
mkdir -p ${REMOTE}
sshfs user@bram.veenboer.xyz:/media/helios/Bram ${REMOTE}

View File

@@ -157,9 +157,10 @@ geo.rik.veenboer.xyz {
# trusted_proxies: Trust 'X-Forwarded-For' header_up if trusted_proxies is also valid (see https://caddyserver.com/docs/caddyfile/options#trusted-proxies)
# default: trusted_proxies
# Respond to anyone in NL
@geofilter expression ({geoip2.country_code} == "NL")
# @geofilter expression {geoip2.country_eu}
route @geofilter {
reverse_proxy host:12345 {
header_up X-Real-IP {remote_host}

View File

@@ -3,7 +3,6 @@ services:
container_name: borgmatic
environment:
- TZ=Europe/Amsterdam
- BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
image: b3vis/borgmatic:v1.1.10-1.4.21
privileged: true
restart: unless-stopped
@@ -13,8 +12,7 @@ services:
- /opt/borgmatic/keys:/keys
- /opt/borgmatic/cache:/cache
- /opt/borgmatic/log:/log
- /root/.ssh:/root/.ssh
- /root/.ssh:/root/.ssh:ro
- /mnt/yotta/xenon/borg:/repo
- /mnt/yotta/xenon/manual:/manual
- /:/shuttle
- /:/shuttle:ro
- /dev/fuse:/dev/fuse

View File

@@ -9,6 +9,5 @@ services:
- /opt/rsnapshot/var/run:/var/run
- /opt/rsnapshot/var/spool:/var/spool
- /opt/rsnapshot/usr:/host/usr
- /opt/host_aliases:/host/etc/host_aliases
- /mnt/yotta/xenon/rsnapshot:/host/scratch
- /root/.ssh:/root/.ssh
- /root/.ssh:/root/.ssh:ro

View File

@@ -52,6 +52,3 @@ include:
- docker-compose.timescaledb.yml
- docker-compose.influxdb.yml
networks:
vpn:
driver: bridge

View File

@@ -6,32 +6,32 @@ lockfile /var/run/rsnapshot/os.pid
snapshot_root /host/scratch/os
backup root@shuttle:/bin shuttle
backup root@shuttle:/boot shuttle
#backup root@shuttle:/boot shuttle
backup root@shuttle:/etc shuttle
backup root@shuttle:/lib shuttle
backup root@shuttle:/lib64 shuttle
backup root@shuttle:/usr shuttle
backup root@shuttle:/var shuttle
#backup root@shuttle:/lib shuttle
#backup root@shuttle:/lib64 shuttle
#backup root@shuttle:/usr shuttle
#backup root@shuttle:/var shuttle
backup root@sepia:/bin sepia
backup root@sepia:/boot sepia
#backup root@sepia:/boot sepia
backup root@sepia:/etc sepia
backup root@sepia:/lib sepia
backup root@sepia:/lib64 sepia
backup root@sepia:/usr sepia
backup root@sepia:/var sepia
#backup root@sepia:/lib sepia
#backup root@sepia:/lib64 sepia
#backup root@sepia:/usr sepia
#backup root@sepia:/var sepia
backup root@server:/bin server
backup root@server:/boot server
#backup root@server:/boot server
backup root@server:/etc server
backup root@server:/lib server
backup root@server:/lib64 server
backup root@server:/usr server
backup root@server:/var server
#backup root@server:/lib server
#backup root@server:/lib64 server
#backup root@server:/usr server
#backup root@server:/var server
exclude /var/cache/apt
exclude /var/lib/apt
exclude /var/lib/docker
exclude /var/lib/mlocate
exclude /usr/lib/debug
exclude /usr/share/locale
exclude /usr/share/locale

View File

@@ -1,3 +1,2 @@
#! /bin/bash
. /etc/container_environment.sh
/usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/bin/rsnapshot -c /etc/rsnapshot/$1.conf $2
/bin/nice -n 19 /bin/ionice -c2 -n7 /usr/bin/rsnapshot -c /etc/rsnapshot/$1.conf $2