Forum Moderators: phranque
I have a simple cron job for rotating backup files. It is run by a script. I see it running, but it is not actually rotating the files. Probably something stupid I am missing, like a flag to the copy "cp" command, but I do not know what it is. Anybody want to look at my script and see what they think?
Script:
cp /hd2/backups/#*$!3.tar /hd2/backups/#*$!4.tar
sleep 30
cp /hd2/backups/#*$!2.tar /hd2/backups/#*$!3.tar
sleep 30
cp /hd2/backups/#*$!1.tar /hd2/backups/#*$!2.tar
sleep 30
cp /hd2/backups/#*$!.tar /hd2/backups/#*$!1.tar
sleep 150
(the script repeats with various other files, but this is the basic format)
Thanks!
Dave