Files
backup-bot-two/abra.sh

15 lines
492 B
Bash

export BACKUPBOT_VERSION=v1
export SSH_CONFIG_VERSION=v1
run_cron () {
schedule="$(crontab -l | tr -s " " | cut -d ' ' -f-5)"
rm -f /tmp/backup.log
echo "* * * * * $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
while [ ! -f /tmp/backup.log ]; do sleep 1; done
echo "$schedule $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
}
setup_restic_s3() {
AWS_SECRET_ACCESS_KEY=$(cat /run/secrets/aws_secret_access_key) restic -r $RESTIC_REPOSITORY init
}