Hi Trogers..
Thanks a lot for ur message..
I got some info on using tar for the backup and I set it up... It has been working well for the past coupla days. What I did was write scripts for a daily incremental backup and a weekly full backup.. and automated this with crontab....
Anyway thanks for ur info pal.. I got rsync downloaded but din set it up coz I was able to set up the one with tar...
Thanks again !!
NOTE.. For others who might be wanting to do something like this and dont know how to do it (like I was a coupla days back...
... ) Here is my script.... Hope this and the one with rsync posted by Trogers shud help you all !!
** This is for a Daily Incremental Backup !!!
#!/bin/sh
LastBackupTime=`cat /mnt/usd1/Last.txt`
tar czv --newer-mtime $LastBackupTime -f /mnt/usd1/`date '+%w'`.tgz /<dir you want to backup>
echo `date '+%Y-%m-%d'` > /mnt/usd1/Last.txt
Put this in /etc/cron.daily/<file name>... and make it executable !!!
** This one is for a Weekly Full Backup !!!
#!/bin/sh
mv /mnt/usd1/Full.tgz /mnt/usd1/Full.tgz.old
tar zcvf /mnt/usd1/Full.tgz /<dir you want to backup>
rm /mnt/usd1/Full.tgz.old
rm /mnt/usd1/0.tgz
rm /mnt/usd1/1.tgz
rm /mnt/usd1/2.tgz
rm /mnt/usd1/3.tgz
rm /mnt/usd1/4.tgz
rm /mnt/usd1/5.tgz
rm /mnt/usd1/6.tgz
Put this in /etc/cron.weekly/<file name> ... again make this one executable too...
What I have done is set up a daily incremental backup which will dump files like 0.tgz, 1.tgz......6.tgz
(0 being Sunday...)
And in the weekly full backup, I have made the previous week' full backup to be renamed and then the current week' full backup happens... and after this, the previous week' daily backup files and the full back files are removed ... This rountine is called rotation I think (thats wat I learnt fromthe websites) This is primarily done to save space on the external HDD...
And finally edited the /etc/crontab.... Actually there is no need to edit it if U have something like run-parts in the crontab file with separate daily, weekly, hourly or monthly sections....
So I just edited the crontab files with regard to the time... thats all !!!
And this has been doing the job well !!! Hope this helps !!!