backup to folders with date as foldername

sander815

Verified User
Joined
Jul 29, 2003
Messages
422
it would be nice to add a feature to the backup script to create backups to a folder with the date of when its created
Now the backup gets overwritten by the new one

Since i backup everynight now, i would want to keep backups for say a week or so.
So, a checkbox to backup to todays date folder(or date when cronjob runs) or just overwrite last backup, like the backup DA howto : http://www.directadmin.com/forum/showthread.php?s=&threadid=1489. It creates dirs with todays date, and puts backups inthere
And the abbility, if possible, to delete backups after a certain age(maybe thats too difficult for now)
One can always delete dirs by hand
 
i think this should be bring up again as there is still no want to upload a backup to a FTP with the folder name as the date.
 
Write a script to rename the current backup file to include the date and run it from cron just before the next backup runs.
 
Or as we do, rename the directory used for backups. Since we keep a finite number of backups we use directories named similar to this:

backup
backup.1
backup.2
backup.3
backup.4

and so forth, similar to the way log-rotate works. Then we use a script every backup period similar to this:
Code:
rm -Rf backup.4
mv backup.3 backup.4
mv backup.2 backup.3
mv backup.1 backup.2
mv backup backup.1
mkdir backup
Jeff
 
but how can we actually rename it to a folder name before it is uploaded into the ftp source?

my backup is done over the ftp...
 
Back
Top