LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxAnswers Discussion (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/)
-   -   DISCUSSION: Quick and Dirty Backups (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/discussion-quick-and-dirty-backups-298678/)

jeremy 03-07-2005 08:55 AM

DISCUSSION: Quick and Dirty Backups
 
This thread is to discuss the article titled: Quick and Dirty Backups

Technoslave 03-07-2005 09:48 AM

Just did a cursory glance at the article, the thing I got out of it was ssh and rsync, maybe some tar thrown in there too. That's how I currently do my backup. I was doing it to two other boxes, one local and one off-site. I backup my home directory, minus a couple of directories that have MP3s in it and media files like movies and tv shows. I don't back up my /tmp dir. I backup all my stats gathering programs and their data, vnstat, mrtg, awstats, as well as my dns/bind, apache, and sql directories, plus a few others.

All in all it's over a gig or so worth of data that I've backed up. The initial backup took a while to do, especially the offsite stuff. But my nightly backups now take around a minute to do, and that's mostly due to rsync checking sums to see if anything needs to be uploaded.

From a perspective of someone who has been doing administration for 12+ years, I don't find anything wrong with doing it this way, especially since I don't have access to a tape drive.

Before attempting this ... well, ok, after I already started, I found several other articles about how to do this and in an even more efficient manner, such as using hard links and soft links and some other junk to actually have a history of backups. It was all rather neat, but all I really need is just a backup, and that's what I have and it works.

Nothing wrong with using rsync to create an off-site or on-site/off-box backup.

prn 03-10-2006 10:56 AM

Nice article. I am working in an environment where I have a couple of machines I need to back up this way and it works very nicely. The main thing I would strongly suggest is adding the -z switch to the rsync command line as in:

rsync -az -e /bin/ssh --delete ...

The -z switch will compress the data as it is sent over the network to the remote machine. That can result in considerable speedup in the data transfer, depending on the type of data being transferred.

Of course, I also advise anyone thinking of doing this to read the man pages on rsync. I have also found it useful to "exclude" certain files or types of files from the backup. The format for exclude-files can be a little tricky, but, again depending on your needs, can be worth quite a lot of savings. For example on one machine where I use this method to back up the entire machine, my exclude-file contains lines like:

+ /dev/
- /dev/**
+ /proc/
- /proc/**

These tell rsync to have a /dev directory and a /proc directory on the remote machine, but not to copy any of their contents. I'm sure other types of exclusions will occur to many readers.

Very useful material! Keep up the good work.

Paul


All times are GMT -5. The time now is 07:29 AM.