Files
restic-backup-docker/run.sh
lobaro-demo ca25a281d3 Execute prune after forget, Improove logging
- Log start and end with total duration
- Copy backup-last.log to backup-error-last.log after fail
2017-02-14 09:44:42 +00: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=0 0 * * *" \
-e "RESTIC_FORGET_ARGS=--keep-last 10" \
-v ~/test-data:/data \
-v ~/test-repo/:/mnt/restic \
-t restic-backup