filesystem snapshot timestamp not correct?
Niki Denev
nike_d at cytexbg.com
Tue Feb 28 00:38:21 PST 2006
Hello,
I'm running a 6.1-PRE machine and have created the following
scripts called from /etc/crontab :
0 0 * * * root /usr/local/sbin/make_snapshot.sh
15 0 * * * root /usr/local/sbin/purge_snapshot.sh
make_snapshot.sh :
#!/bin/sh
date=`date +%d-%m-%y`
/sbin/mksnap_ffs / /.snap/snapshot-$date
purge_snapshot.sh:
#!/bin/sh
/usr/bin/find /.snap -name "snapshot-*" -type f -ctime +7d -exec /bin/rm '{}' \;
so i will have snapshot created each day, and all snapshots older than 7 days will be deleted.
but i have more than 7 files in /.snap :
ls -la /.snap/
total 125460
drwxrwxr-x 2 root operator 512 Feb 28 00:00 .
drwxr-xr-x 19 root wheel 512 Feb 27 13:08 ..
-r--r----- 1 root operator 536870984 Feb 28 09:36 snapshot-20-02-06
-r--r----- 1 root operator 536870984 Feb 28 09:36 snapshot-21-02-06
-r--r----- 1 root operator 536870984 Feb 28 09:36 snapshot-22-02-06
-r--r----- 1 root operator 536870984 Feb 28 09:36 snapshot-23-02-06
-r--r----- 1 root operator 536870984 Feb 28 09:36 snapshot-24-02-06
-r--r----- 1 root operator 536870992 Feb 28 09:36 snapshot-25-02-06
-r--r----- 1 root operator 536870992 Feb 28 09:36 snapshot-26-02-06
-r--r----- 1 root operator 536870992 Feb 28 09:36 snapshot-27-02-06
-r--r----- 1 root operator 536870992 Feb 28 09:57 snapshot-28-02-06
and most of them are with the same timestamp?
Any ideas? Probably i'm doing something wrong, but can't see it yet...
Regards,
Niki
More information about the freebsd-stable
mailing list