Hi all,
I've been making a wrapper script for the backup tool 'duplicity',
allowing me to create config files for each resource, wherein I define
whether a snapshot should be made prior to backing up the resource or
not.
Now I find that my snapshots never change ....
The script creates a snapshot, creates md device, mounts it, runs
backup against the mounted snapshot, dismounts, removes md device, and
rm -f's the snapshot file.
The problem is .. Whenever I look into the mounted snapshot, a given
directory looks like so:
drwxr-xr-x 3 root wheel 512 Jan 29 15:25 .
drwxr-xr-x 18 root wheel 512 Jan 29 13:49 ..
-rw------- 1 root wheel 1281 Jan 31 17:12 .bash_history
-rw-r--r-- 2 root wheel 786 Jan 29 13:00 .cshrc
-rw-r--r-- 1 root wheel 143 Jan 29 13:00 .k5login
-rw-r--r-- 1 root wheel 293 Jan 29 13:00 .login
-rw-r--r-- 2 root wheel 253 Jan 29 13:00 .profile
drwxr-xr-x 2 root wheel 512 Jan 29 13:00 .ssh
However, when looking into the same directory outside the snapshot, it
looks like so:
-rw------- 1 root wheel 2961 Feb 12 00:39 .bash_history
-rw-r--r-- 2 root wheel 786 Jan 29 13:00 .cshrc
-rw-r--r-- 1 root wheel 143 Jan 29 13:00 .k5login
drwx------ 2 root wheel 512 Feb 11 16:23 .links
-rw-r--r-- 1 root wheel 293 Jan 29 13:00 .login
-rw-r--r-- 2 root wheel 253 Jan 29 13:00 .profile
drwxr-xr-x 2 root wheel 512 Jan 29 13:00 .ssh
-rw-r--r-- 1 root wheel 948424 Feb 11 13:14 bsd-jdk16-
patches-3.tar.bz2
-rw-r--r-- 1 root wheel 46938731 Feb 11 16:23 diablo-jdk-
freebsd6.amd64.1.5.0.07.01.tbz
-rw-r--r-- 1 root wheel 2116124 Feb 11 13:11 jdk-6u3-fcs-bin-b05-
jrl-24_sep_2007.jar
-rw-r--r-- 1 root wheel 8608204 Feb 11 13:11 jdk-6u3-fcs-
mozilla_headers-b05-unix-24_sep_2007.jar
-rw-r--r-- 1 root wheel 116791442 Feb 11 13:15 jdk-6u3-fcs-src-b05-
jrl-24_sep_2007.jar
The snapshot was made just now, long after those additional files were
placed in the snapshot.
I am at a total loss here. Is it re-using the first snapshot I ever
made of this filesystem, even though I've removed it? Didn't I
understand how to create/remove snapshots? Is this a bug?
Any input is appreciated.
Thanks,
/Eirik