diff --git a/templates/rsyncTemplate.sh b/templates/rsyncTemplate.sh index c0ec8d9..a330bb2 100644 --- a/templates/rsyncTemplate.sh +++ b/templates/rsyncTemplate.sh @@ -18,4 +18,4 @@ touch "${RSYNC_DEST_PATH}"/timestamp.fix # Run retention policy cd "${RSYNC_DEST}" -rm -rf `ls -t | tail -n +$(("${RSYNC_RETENTION_DAYS}"+2))` \ No newline at end of file +rm -rf `ls -t | tail -n +$(("${RSYNC_RETENTION_KEEP_LAST}"+2))` \ No newline at end of file diff --git a/templates/variablesTemplate.sh b/templates/variablesTemplate.sh index 240c836..6ac9727 100644 --- a/templates/variablesTemplate.sh +++ b/templates/variablesTemplate.sh @@ -57,7 +57,7 @@ readonly LOG_RETENTION='30' ## Set these vars # readonly RSYNC_SOURCE='/path/to/dir/to/backup' # readonly RSYNC_DEST='/path/to/dir/to/backup/to' -# readonly RSYNC_RETENTION_DAYS='7' +# readonly RSYNC_RETENTION_KEEP_LAST='7' ## Leave these vars be # readonly RSYNC_MANIFEST="${SCRIPT_DIR}/rsyncManifest"