You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vincent Lefevre <vi...@vinc17.org> on 2005/07/06 12:32:20 UTC
Re: Verifying Backups
On 2005-06-26 12:01:46 +1000, Chris Jensen wrote:
> Never mind, I figured out a solution:
>
> HEAD=`svnlook youngest /backup_repos`
>
> svn ls -R -r $HEAD file:///repos | grep -v "/$" | sort > tree.txt
> svn ls -R -r $HEAD file:///backup_repos | grep -v "/$" | sort |
> diff tree.txt - || echo "Backup does not contain all files"
>
> mknod orig p
>
> while read file ; do
> svn cat -r $HEAD "file://repos/$file" > orig &
>
> svn cat -r $HEAD "file:///backup_repos/$file" |
> diff orig - || echo "$file not backed up correctly"
> done < tree.txt
>
> This verifies the full content of the HEAD revision in the backup.
But this doesn't check the properties. I wrote the following
script a few weeks ago to compare two repositories at various
revisions (this script can be called in a loop on revision
numbers):
# Checkout a working copy and create .svnlog and .svnprop files.
# Working copies can be compared with "diff -x.svn -r wc1 wc2".
if [ $# -lt 2 ] || [ $# -gt 3 ]; then
echo "Usage: svnexp <url> <dir> [ <rev> ]" >&2
exit 1
fi
set -e
url="$1"
dir="$2"
rev="${3:-HEAD}"
if [ -e "$dir" ]; then
cd "$dir"
rm -f .svnlog .svnprop
svn update -r"$rev" --non-interactive --ignore-externals
else
svn checkout -r"$rev" --non-interactive --ignore-externals "$url" "$dir"
cd "$dir"
fi
svn log --xml > .svnlog
svn proplist --verbose `svn list -R` > .svnprop
--
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org