adjust ls for existing backups to new delete_from_file behaviour
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
39e8eb4c94
commit
2a6ab4c125
1 changed files with 1 additions and 2 deletions
|
@ -457,9 +457,8 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
|||
|
||||
#
|
||||
# Check: maximum number of backups is reached?
|
||||
# If so remove. Use grep and ls -p so we only look at directories
|
||||
#
|
||||
count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \
|
||||
count="$(pcmd ls -p1 "${ddir}/${INTERVAL}.*/" | wc -l \
|
||||
| sed 's/^ *//g')" || _exit_err "Counting backups failed"
|
||||
|
||||
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
||||
|
|
Loading…
Reference in a new issue