Inconsistent snapshot contents during backup

Titus von Boxberg ut at
Thu Jun 2 02:31:35 PDT 2005

Hi there,

on two servers we do daily backups onto a tape of a mounted snapshot via

The problem is that on both machines almost always one or a few files

Here's what we do:

#!/bin sh
mksnap_ffs / /.snap/backupsnap
mdconfig -a -t vnode -f /.snap/backupsnap -u 5
mount -o ro /dev/md5 /mnt
cd /mnt
    cp fileinquestion /tmp/x1 # see below
tar cf /dev/sa0 ....
    cp fileinquestion /tmp/x2 # see below
tar df /dev/sa0 ....
    if [ $? -eq 1 ] ; then	# see below
      tar -C /tmp -xf /dev/sa0 fileinquestion
      mv /tmp/fileinquestion /tmp/x3

On both machines, the second tar complains that the contents of a file is
(but not the size).
It's always the same file (a cyrus imap database).

To see whats happening, we copied the file immediately after the mount of
snapshot into a directory outside the snapshot, also took a copy of the
snapshotted file after the backup tar and read back the file from tape after
the complaint of the verifying tar (see indented code above).

We noticed that almost always none of the copies (x1, x2, x3) were
This means that also the files x1 and x2 that are never copied and read back
tape differ.
We tried to analyze the differences over several days but could not see
anything magical.

Is there anything wrong with the script or the underlying assumptions ?

If not, any ideas what could we do to analyze the problem?

The system on the first machine is 5.2.1 RELEASE, the system on the second
is 5.3 RELEASE



More information about the freebsd-fs mailing list