On Tue, Sep 15, 2009 at 7:00 PM, Jacob Godserv<address@hidden> wrote:
On Tue, Sep 15, 2009 at 03:46, László Monda<address@hidden> wrote:
Hi List,
How is it possible to do integrity check with duplicity on backed up
content? The verify action compares content, but it's not explicitly
for integrity checks, right?
Thanks in advance!
I always generate sha512sums after each backup, with something like
following script. This only runs in Linux environment.
--------------------
files=$(find -name 'duplicity*gpg')
for file in ${files}; do
sha512_dir=$(dirname "${file}")"/.sha512sums/"
if [[ ! -d "${sha512_dir}" ]]; then mkdir "${sha512_dir}" || exit 1; fi
file_checksum="${sha512_dir}"$(basename "${file}")".sha512sum"
if [[ ! -e "${file_checksum}" || ! -s "${file_checksum}" ]]; then
echo "Generating checksum for ${file} and storing in
${file_checksum}..."
sha512sum ${file}> "${file_checksum}"
fi
done
--------------------
I can them check the sums by running the following command:
# sha512sum -c .sha512sums/*
Or I can check something specific like this:
# sha512sum -c .sha512sums/duplicity-full-signatures.DATETZ.sigtar.gpg.sha512sum
Something like that would verify that the backup data is intact.
Sounds good, however it'd be very nice to have an integrity-check
action specifically for this task.