Hi,
i have a problem with my dirvish installation. I use kubuntu 7.10 Gutsy and the
dirvish-deb from the kubuntu repository. Dirvish and rsync are installed at
server and client. The dirvish --init and a manuel backup works fine, but ...
I set up an cronjob which respond the following error each day:
"dirvish error: branch /snapshot/tvt/website:default image 20071208 failed"
Here the crontab:
<<
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.daily
47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.weekly
52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.monthly
*/10 * * * * root /usr/lib/portsentry/portfilter.sh
0 23 * * * root /etc/dirvish/dirvish-cronjob
#
>>
here the dirvish-cronjob: (file (as seen here) is from the kubuntu dirvish-deb!)
<<
#! /bin/sh
#
# daily cron job for the dirvish package
#
if [ ! -x /usr/sbin/dirvish-expire ]; then exit 0; fi
if [ ! -s /etc/dirvish/master.conf ]; then exit 0; fi
mount_check() {
mntout=`tempfile -p mount`
mount $1 >$mntout 2>&1
if [ ! -d $1/lost+found ]; then # only works for "real" filesystems :-)
# (Yes, I know about reiserfs.)
echo "'mount $1' failed?! Stopping."
echo "mount output:"
cat $mntout
rm -f $mntout
exit 2
fi
if stat $1 | grep 'Inode: 2[^0-9]' >/dev/null; then # ditto
rm -f $mntout
return 0 # ok
fi
echo "$1 isn't inode 2 ?! Mount must have failed; stopping."
echo ''
stat $1
echo "mount output:"
cat $mntout
rm -f $mntout
umount $1
exit 2
}
## Example of how to mount and umount a backup partition...
# mount_check /backup
/usr/sbin/dirvish-expire --quiet && /usr/sbin/dirvish-runall --quiet
rc=$?
# umount /backup || rc=$?
exit $rc
>>
here the master.conf
<<
bank:
/home/backup
exclude:
lost+found/
*~
.nfs*
Runall:
website 22:00
expire-default: +15 days
expire-rule:
# MIN HR DOM MON DOW STRFTIME_FMT
* * * * 1 +3 months
* * 1-7 * 1 +1 year
* * 1-7 1,4,7,10 1
* 10-20 * * * +4 days
# * * * * 2-7 +15 days
>>
and here the default.conf
<<
rsh: ssh -p 22
client: root@<<myhost>>
tree: /usr/local/apache2/
xdev: true
index: gzip
image-default: %Y%m%d
>>
<<myhost>> is replaced here for security
here is the default.hist
GNU nano 1.3.10 File:
/home/backup/website/dirvish/default.hist
<<
#IMAGE CREATED REFERECE EXPIRES
20071205 2007-12-05 16:33:11 default +4 days == 2007-12-09 16:30:30
20071204 2007-12-05 16:51:22 20071205 +15 days == 2007-12-19
22:00:00
20071206 2007-12-06 22:04:07 20071204 +15 days == 2007-12-21
22:00:00
20071207 2007-12-08 00:00:06 20071206 +15 days == 2007-12-22
22:00:00
20071208 2007-12-09 00:00:06 20071207 +15 days == 2007-12-23
22:00:00
20071209 2007-12-09 23:00:07 20071208 +3 months == 2008-03-09
22:00:00
>>
and the ls of ..../website/
<<
total 0
drwxr-xr-x 8 root root 192 2007-12-09 23:00 .
drwxr-xr-x 3 root root 72 2007-12-05 14:42 ..
drwxr-xr-x 3 root root 144 2007-12-05 16:51 20071204
drwxr-xr-x 3 root root 144 2007-12-06 22:04 20071206
drwxr-xr-x 3 root root 144 2007-12-08 00:00 20071207
drwxr-xr-x 3 root root 144 2007-12-09 00:00 20071208
drwxr-xr-x 3 root root 144 2007-12-09 23:00 20071209
drwxr-xr-x 2 root root 112 2007-12-05 16:33 dirvish
>>
Is it a problem, that the history think, that exist an image of 20071205 but no
directory 20071205 exist? Can this cause the "failed" at the end of the
cron-job? Or is the problem at a differend place?
All help is welcome!
Grez. Frank
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish