simply check for incomplete backups
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
c10b46111b
commit
9cb8b99353
1 changed files with 6 additions and 10 deletions
10
ccollect
10
ccollect
|
@ -448,19 +448,15 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
( pcmd cd "${ddir}" ) || _exit_err "Cannot change to ${ddir}. Skipping."
|
( pcmd cd "${ddir}" ) || _exit_err "Cannot change to ${ddir}. Skipping."
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check: incomplete backups? (needs echo to remove newlines)
|
# Check incomplete backups (needs echo to remove newlines)
|
||||||
#
|
#
|
||||||
# *.marker: not possible, creates an error, if no *.marker exists
|
pcmd ls -d1 "${ddir}" | grep "${CMARKER}\$" > "${TMP}" ||\
|
||||||
# -> catch return value
|
_exit_err "Cannot list incomplete files"
|
||||||
|
|
||||||
pcmd ls -d1 "${ddir}/"*"${CMARKER}" > "${TMP}" 2>/dev/null; ret=$?
|
|
||||||
|
|
||||||
if [ "${ret}" -eq 0 ]; then
|
|
||||||
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
|
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
|
||||||
if [ -f "${c_delete_incomplete}" ]; then
|
if [ -f "${c_delete_incomplete}" ]; then
|
||||||
delete_from_file "${TMP}" "${CMARKER}"
|
delete_from_file "${TMP}" "${CMARKER}"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check: maximum number of backups is reached?
|
# Check: maximum number of backups is reached?
|
||||||
|
|
Loading…
Reference in a new issue