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:
John Lawless 2009-05-18 22:22:15 -07:00 committed by Nico Schottelius
parent 8cc0f04874
commit a030a98982

View file

@ -366,6 +366,8 @@ while [ "${i}" -lt "${no_sources}" ]; do
_exit_err "Source ${c_source} is not readable. Skipping." _exit_err "Source ${c_source} is not readable. Skipping."
fi fi
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 # Destination is a path