simply check for incomplete backups

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-01-15 02:04:10 +01:00
parent 9cb8b99353
commit e39e53d0fb

View file

@ -450,7 +450,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
# #
# Check incomplete backups (needs echo to remove newlines) # Check incomplete backups (needs echo to remove newlines)
# #
pcmd ls -d1 "${ddir}" | grep "${CMARKER}\$" > "${TMP}" ||\ pcmd ls -d1 "${ddir}" | grep "${CMARKER}\$" > "${TMP}" || \
_exit_err "Cannot list incomplete files" _exit_err "Cannot list incomplete files"
_techo "Incomplete backups: $(echo $(cat "${TMP}"))" _techo "Incomplete backups: $(echo $(cat "${TMP}"))"
@ -461,6 +461,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
# #
# Check: maximum number of backups is reached? # Check: maximum number of backups is reached?
# #
# FIXME: simplify, grep, cd? => no star, does not get expanded on failure
count="$(pcmd ls -d1 "${ddir}/${INTERVAL}."*"/" | wc -l | sed 's/^ *//g')" \ count="$(pcmd ls -d1 "${ddir}/${INTERVAL}."*"/" | wc -l | sed 's/^ *//g')" \
|| _exit_err "Counting backups failed" || _exit_err "Counting backups failed"