I have tried to get a backup happening for months now with little success.
The script below works fine when run directly but when run as a cron task, it backs up some of the first directory (about 2 gb), then quits.
no errors in the cron logs and the machine is ONLY used for backups. The task is set to run when the network is not in use.
I have tried smbtar and every other way I could think of backing up, but it always seems to fail with cron.
(all updates have been applied)
Any ideas on what the problem might be?
#!/bin/sh export USER=administrator%****** smbmount //wallaby/users /mnt/temp
tar -cvf /mnt/windows/user2003.tar \ --directory /mnt/temp/2003 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/user2004.tar \ --directory /mnt/temp/2004 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/user2005.tar \ --directory /mnt/temp/2005 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/user2006.tar \ --directory /mnt/temp/2006 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/user2007.tar \ --directory /mnt/temp/2007 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/user2008.tar \ --directory /mnt/temp/2008 --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
tar -cvf /mnt/windows/userstaff.tar \ --directory /mnt/temp/staff --exclude=User.dat --exclude=History --exclude=Application\ Data --exclude=*.dat --exclude=*.exe --exclude=*.tmp --exclude=Cookies .
cd /mnt/windows tar -cvf /dev/st0 . smbumount /mnt/temp mt -f /dev/st0 offline
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
