Add backup scripts

This commit is contained in:
MSWS
2024-06-30 21:04:49 -07:00
parent f47c89048f
commit be6b3cf5c0
4 changed files with 61 additions and 38 deletions

10
backup.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
source /home/iboaz/.restic.sh
exec > >(logger -t backup) 2>&1
/usr/bin/restic backup -o s3.storage-class=INTELLIGENT_TIERING --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose /
/usr/bin/restic -r /mnt/usb/backups/ backup --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose /
/usr/bin/restic forget --keep-last 1 --keep-daily 3 --keep-weekly 4 --keep-monthly 3 --keep-yearly 3 --prune
/usr/bin/restic -r /mnt/usb/backups/ forget --keep-last 1 --keep-daily 7 --keep-weekly 8 --keep-monthly 3 --keep-yearly 3 --prune

38
cf-dns/docker-compose.yml Normal file
View File

@@ -0,0 +1,38 @@
version: "3"
services:
cf-public:
image: favonia/cloudflare-ddns:latest
network_mode: host
restart: always
cap_add:
- SETUID
- SETGID
cap_drop:
- all
read_only: true
security_opt:
- no-new-privileges:true
environment:
- PUID=1000
- PGID=1000
- CF_API_TOKEN=${CF_API_TOKEN}
- DOMAINS=*.code.msws.xyz
- PROXIED=false
# cf-internal:
# image: favonia/cloudflare-ddns:latest
# network_mode: host
# restart: always
# cap_add:
# - SETUID
# - SETGID
# cap_drop:
# - all
# read_only: true
# security_opt:
# - no-new-privileges:true
# environment:
# PUID: 1000
# PGID: 1000
# CF_API_TOKEN: ${CF_API_TOKEN}
# DOMAINS: "go.msws.xyz"
# PROXIED: "true"

View File

@@ -1,38 +0,0 @@
version: "3"
services:
# cf-public:
# image: favonia/cloudflare-ddns:latest
# network_mode: host
# restart: always
# cap_add:
# - SETUID
# - SETGID
# cap_drop:
# - all
# read_only: true
# security_opt:
# - no-new-privileges:true
# environment:
# - PUID=1000
# - PGID=1000
# - CF_API_TOKEN=${CF_API_TOKEN}
# - DOMAINS=*.code.msws.xyz
# - PROXIED=false
cf-internal:
image: favonia/cloudflare-ddns:latest
network_mode: host
restart: always
cap_add:
- SETUID
- SETGID
cap_drop:
- all
read_only: true
security_opt:
- no-new-privileges:true
environment:
PUID: 1000
PGID: 1000
CF_API_TOKEN: ${CF_API_TOKEN}
DOMAINS: "go.msws.xyz"
PROXIED: "true"

13
excludes.txt Normal file
View File

@@ -0,0 +1,13 @@
/home/iboaz/jellyfin/media
/proc
/sys
/tmp
/var/tmp
/var/cache
/var/log
/dev
/mnt
/media
/lost+found
node_modules
__pycache__