Backups rotator script: Want one?

df-sean

Verified User
Joined
Feb 8, 2007
Messages
47
Hi. I wrote a neat little Python script to manage my backups for me. I thought it might be nice to share it with others.

It rotates your daily tarballs into a daily/ and weekly/ directory for each user.

It's not extensively tested but seems to be working great for me so far. If anyone wants to contribute bug-fixes or enhancements, that would be neato.
 

Attachments

Last edited:
how are the cpu usage on this one?
does it bog down less than the DA's backup script?
 
Just to be clear, this isn't a replacement for DA's built-in backups system. It's meant to be used together with it.

So if you use DA's backup system, it will create tarballs for you which will appear by default in: /home/admin/user_backups/. And then the next day when the script runs, it will blow away yesterdays tarballs with fresh new ones.

My script simply rotates these out into a new directory -- by default: /home/admin/user_backups_archives/. It keeps 7 daily backups and as many weekly backups as you like (4 by default) for each user.

To answer lkbryant's question directly, this script should be very very light on resources because it's really just renaming the tarballs that DA has already made.
 
What if it was to go to a remote FTP location, How would you suggest doing this?

Thanks,
Karl Glover.
 
I would suggest setting up a cronjob to use rsync. This script is really just intended to rotate your backups. Moving those tarballs off-site somewhere is another matter ;-)
 
Back
Top