LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.