System Backup - Delete old backups

eliassorensen

Verified User
Joined
Dec 23, 2011
Messages
10
I want to run a System Backup cronjob every day, but contrary to the "admin backup/transfer" that just overrides the file, System Backup makes a new folder with the date, hence having multiple folders for each date the backup is run.

I would love to have just ONE folder with the latest backup - so it'll delete the old folder on every backup.

The reason is, that I use Dropbox to synchronize the backups. It works great with admin backup, as it creates a zip-file for each user, and overrides the old one on each backup. That way, I only have the file one place in Dropbox, but I can right click it, and see 30 versions (days) back without it takes up backup*30 space.

Is it possible to do the same with System Backup natively in DA? Or will I have to create a manual cronjob that runs a script (e.g. python) to delete the old folders every night (for example truncates the folder 30 minutes before the System Backup cronjob runs).

Any ideas?
 
Is it possible to do the same with System Backup natively in DA? Or will I have to create a manual cronjob that runs a script (e.g. python) to delete the old folders every night (for example truncates the folder 30 minutes before the System Backup cronjob runs).
My need is similar to yours and I use a cronjob which renames the directory rather than deleting it, keeps a weeks worth of backups, and then deletes the last one. I've described it elsewhere on these forums, but it's like this
Code:
rm -Rf admin_backup7
mv admin_backup6 admin_backup7
mv admin_backup5 admin_backup6
mv admin_backup4 admin_backup5
mv admin_backup3 admin_backup4
mv admin_backup2 admin_backup3
mv admin_backup admin_backup2
mkdir admin_backup
Jeff
 
Thanks Jeff! Thank could definitely work, but it makes it pretty hard using Dropbox's versioning.

Check this example from the admin backup/transfer tool, where it overrides the old file every night. I can then right click each user/reseller and see previous versions (31 versions = days back).

fHETXKX.png


If I rename the folders, and suddenly need to go e.g. 15 days back, it would be pretty hard to find the correct backup?
 
I'm confused.. Is this about system backup as the title states or admin backup?
Perhaps they are similar enough but sysbk I expect could lend itself to different methods.
 
Back
Top