forked from ungleich-public/ccollect
First, I added the following before any old backup gets deleted:
> # Verify source is up and accepting connections before deleting any old backups > rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." I think that this quick test is a much better than, say, pinging the source in a pre-exec script: this tests not only that the source is up and connected to the net, it also verifies (1) that ssh is up and accepting our key (if we are using ssh), and (2) that the source directory is mounted (if it needs to be mounted) and readable.
This commit is contained in:
parent
8cc0f04874
commit
a030a98982
1 changed files with 2 additions and 0 deletions
|
@ -366,6 +366,8 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
|||
_exit_err "Source ${c_source} is not readable. Skipping."
|
||||
fi
|
||||
fi
|
||||
# Verify source is up and accepting connections before deleting any old backups
|
||||
rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping."
|
||||
|
||||
#
|
||||
# Destination is a path
|
||||
|
|
Loading…
Reference in a new issue