summaryrefslogtreecommitdiffstats
path: root/scripts/bash/restic_run
blob: 0b60c40818b549e521984e5719dbee3eda581cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 $?"