Do not run spearate prune, but let the user use --prune in RESTIC_FORGET_ARGS

This commit is contained in:
lobaro-demo
2017-04-03 13:21:57 +00:00
parent 0490f182d5
commit 8ba9fb4a8f
2 changed files with 1 additions and 12 deletions

View File

@@ -65,7 +65,7 @@ The container is setup by setting [environment variables](https://docs.docker.co
* `RESTIC_TAG` - Optional. To tag the images created by the container.
* `NFS_TARGET` - Optional. If set the given NFS is mounted, i.e. `mount -o nolock -v ${NFS_TARGET} /mnt/restic`. `RESTIC_REPOSITORY` must remain it's default value!
* `BACKUP_CRON` - A cron expression to run the backup. Default: `* */6 * * *` aka every 6 hours.
* `RESTIC_FORGET_ARGS` - Optional. Only if specified `restic forget` is run with the given arguments after each backup. Example value: `-e "RESTIC_FORGET_ARGS=--keep-last 10 --keep-hourly 24 --keep-daily 7 --keep-weekly 52 --keep-monthly 120 --keep-yearly 100"`
* `RESTIC_FORGET_ARGS` - Optional. Only if specified `restic forget` is run with the given arguments after each backup. Example value: `-e "RESTIC_FORGET_ARGS=--prune --keep-last 10 --keep-hourly 24 --keep-daily 7 --keep-weekly 52 --keep-monthly 120 --keep-yearly 100"`
## Volumes

View File

@@ -38,17 +38,6 @@ if [ -n "${RESTIC_FORGET_ARGS}" ]; then
logLast "Finished forget at $(date)"
if [[ $rc == 0 ]]; then
echo "Forget Successfull"
echo "Prune obsolete data"
restic prune >> ${lastLogfile} 2>&1
rc=$?
logLast "Finished prune at $(date)"
if [[ $rc == 0 ]]; then
echo "Prune Successfull"
else
echo "Prune Failed with Status ${rc}"
restic unlock
copyErrorLog
fi
else
echo "Forget Failed with Status ${rc}"
restic unlock