Template für Backupskript

This commit is contained in:
2023-11-24 15:04:53 +00:00
parent b1ee2b9b35
commit 8204458cec

12
restic-backup.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Alle Container-IDs abrufen
container_ids=$(docker ps -q)
docker stop $container_ids
source .restic-env
restic backup -q --tag daily --exclude-file=/home/stefan/exclude-file.txt /home/stefan/
restic backup -q --tag daily /etc
restic forget -q --keep-last 14 --prune
docker start $container_ids
# Muster für Restic-Backup Skript
# muss im /root Ordner liegen