From 8204458cec86dbc00d64862ea4af56cd8ce8b469 Mon Sep 17 00:00:00 2001 From: StefanMewes Date: Fri, 24 Nov 2023 15:04:53 +0000 Subject: [PATCH] =?UTF-8?q?Template=20f=C3=BCr=20Backupskript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restic-backup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 restic-backup.sh diff --git a/restic-backup.sh b/restic-backup.sh new file mode 100644 index 0000000..01bb939 --- /dev/null +++ b/restic-backup.sh @@ -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 \ No newline at end of file