Files
restic-backup-docker/run.sh
Max Stabel 15012cdab1 Run test backup every minute
Change interval of cron to backup every minute instead of once a day at
midnight to make it in line with the documentation.
2019-10-11 10:53:37 +02:00

17 lines
445 B
Bash
Executable File

#!/bin/sh
echo "Removing old container names 'backup-test' if exists"
docker rm -f -v backup-test || true
echo "Start backup-test container. Backup of ~/test-data/ to repository ~/test-repo/ every minute"
docker run --privileged --name backup-test \
-e "RESTIC_PASSWORD=test" \
-e "RESTIC_TAG=test" \
-e "BACKUP_CRON=* * * * *" \
-e "RESTIC_FORGET_ARGS=--keep-last 10" \
-v ~/test-data:/data \
-v ~/test-repo/:/mnt/restic \
-t restic-backup