[clue-admin] Backups

Glen Newell skipworthy at realivetech.com
Sun Feb 26 19:01:29 MST 2006


Jed S. Baer wrote:
> We've talked a bit about backups at the admin meetings, <snip> here's a probably command line.
>
> rsync -ave ssh --delete www.cluedenver.org:/tux2/backups/
> /your/clue/backup/directory/
>   

Actually-

I do regular rsync backups on several servers...I might have room on my
backup box to do Clue as well. The lines I use are like (assuming I am
not currently the user on the remote machine I need to be):

rsync -avzpHD -del -e ssh [rsyncuser at remotehost]:/directory/to/backup 
/local/backup/location

-z- compresses the stream ( I forget what the rate is, but it makes a
difference)
-p preserves the permissions of the directories
-H preserves hard links
-D preserves device info: (this is really only available to superuser/root)
-e just specifies remote shell to use (necessary on some systems)


 Also- couple things: the --delete switch(es) do a sort of comparison of
the directories, and removes stuff that was deleted from the directory
backed up- a very useful feature imho. Also: The Best/easiest way to do
this is to have an rsync user/group that was *only* allowed to read the
source directories (duh).

It also bears mentioning that this would amount to a full backup witha 
differential update- you ahve all teh available data from the last
update. ALSO it is important to note that you can't, for example, backup
a live sql database this way: I do daily sql backups, and have them
tar'd and rsyncd (usually on a different script)
> I guess there'd need to be another switch in there to identify the
> username you'd be using to connect to the CLUE server. 
It works best to connect using the user that's authorized to do the
backup...

hth-

Glen

> Hmmm, the command
> line on the rsync manpage looks different. Perhaps a couple of you folks
> on high-speed connections could test things out here?
>
> Also, right now the --delete switch would be meaningless, since it doesn't
> appear that old backups are being deleted. Can we add the backup directory
> to logrotate so that old backups get compressed, and *really* old backups
> get deleted? Or just compress the backups when they're produced, but still
> have logrotate delete anything older than .... I dunno, do we need to keep
> more than 4?
>
> Also, in order for an offiste backup via rsync of our backup directory to
> work, the ownership and/or permissions on the backup files would have to
> change. Right now, they're readable only by root. Maybe we could create a
> group, e.g. "rbackup", to which the people doing rsync would be added, and
> the backup files could belong to root:rbackup, with group read permission.
>
> jed
>   

_______________________________________________
CLUE-admin mailing list
CLUE-admin at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-admin



More information about the clue-admin mailing list