summaryrefslogtreecommitdiffstats
path: root/scripts/bash/restic_run
diff options
context:
space:
mode:
authorGeorg2021-07-21 13:47:29 +0200
committerGeorg2021-07-21 13:47:29 +0200
commit16d3474327644bad618dcf5fb4548a8d52e7c2f8 (patch)
treef66b33587d4f52f5ed669a41a23273bc55edd3b8 /scripts/bash/restic_run
parent2678e73ff1eb2f4e0a5d02a750ec4c047333da6b (diff)
downloadsystem-16d3474327644bad618dcf5fb4548a8d52e7c2f8.tar.gz
system-16d3474327644bad618dcf5fb4548a8d52e7c2f8.tar.bz2
system-16d3474327644bad618dcf5fb4548a8d52e7c2f8.zip
Initial Scripts Run
Signed-off-by: Georg <georg@lysergic.dev>
Diffstat (limited to 'scripts/bash/restic_run')
-rw-r--r--scripts/bash/restic_run16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/bash/restic_run b/scripts/bash/restic_run
new file mode 100644
index 0000000..0b60c40
--- /dev/null
+++ b/scripts/bash/restic_run
@@ -0,0 +1,16 @@
+#!/bin/bash
+#/usr/bin/echo Executing Restic S3 Backup for $(hostname -f)
+export RESTIC_REPOSITORY="s3:https://$S3HOST/$S3BUCKET"
+export RESTIC_PASSWORD_FILE="/etc/restic/.sec"
+export AWS_ACCESS_KEY_ID="$S301"
+export AWS_SECRET_ACCESS_KEY="$S302"
+export RESTIC_CACHE_DIR="/opt/restic/cache"
+EXCLUDE=".restic.excludes"
+/usr/bin/restic --verbose backup --exclude-file="/etc/$EXCLUDE" /etc
+echo "EXIT $?"
+/usr/bin/restic --verbose backup --exclude-file="/home/$EXCLUDE" /home
+echo "EXIT $?"
+/usr/bin/restic --verbose backup --exclude-file="/opt/$EXCLUDE" /opt
+echo "EXIT $?"
+/usr/bin/restic --verbose backup --exclude-file="/srv/$EXCLUDE" /srv
+echo "EXIT $?"