You might want to use NTFS instead of FAT32. IIRC FAT32 can't handle files larger than 4 GB. Here are the daily and weekly backup scripts I have running on my server via cron:
Code:
#!/bin/sh
/etc/init.d/apache2 stop
/etc/init.d/mysql stop
tar czf /backup/`date +%F`-daily.tgz --exclude='/backup/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*' --exclude='/dev/*' --exclude='/var/cache/*' -g/backup/backup.snapshot /
cd /backup
echo put `date +%F`-daily.tgz | smbclient //irisvr/devbackup\$ -Uusername password
rm /backup/`date +%F -d '14 days ago'`-daily.tgz
echo del `date +%F -d '14 days ago'`-daily.tgz | smbclient //irisvr/devbackup\$ -Uusername password
/etc/init.d/mysql start
/etc/init.d/apache2 start
And weekly:
Code:
#!/bin/sh
/etc/init.d/apache2 stop
/etc/init.d/mysql stop
rm /backup/backup.snapshot
tar czf /backup/`date +%F`-full.tgz --exclude='/backup/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*' --exclude='/dev/*' --exclude='/var/cache/*' -g/backup/backup.snapshot /
cd /backup
echo put `date +%F`-full.tgz | smbclient //irisvr/devbackup\$ -Uusername password
rm `date +%F -d '14 days ago'`-full.tgz
echo del `date +%F -d '14 days ago'`-full.tgz | smbclient //irisvr/devbackup\$ -Uusername password
/etc/init.d/mysql start
/etc/init.d/apache2 start
You can ignore the apache and mysql parts since you probably aren't running those servers so they don't need shutdown and restarted after the backup. After the backup it also deletes the one made 2 weeks ago so I only have two weeks of backups at any one time. It also then uses smbclient to copy the backup file to another Windows server on the network.
Bookmarks