Files
backup-bot-two/abra.sh
p4u1 cd89800fd4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
feat: Adds a command to setup the restic repository in s3
2025-11-05 16:21:31 +01:00

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
}