![]() Rsync -aruvhz -progress server1:/export/datadir/ /export/backupdir/ Let’s see what the above would look like from one server to another, as if you are running the command from the server you are syncing to: This tells rsync to use compression during the file transfer thus saving bandwidth. There is another one that is good when syncing between two separate servers, and that is the “z” switch. U = skip files that are newer on the receiving end Now, those command line switches, what do they do? Check it out: ![]() Rsync -aruv /export/datadir/ /export/backupdir/ Let’s say you want to sync two local directories, how would you do that? Well, if we are syncing /export/datadir to /export/backupdir it would look something like this: This would be much like scp, only you can sync whole directory trees. Guess what? You can not only use rsync to sync up local directories on the same server (this can be real handy for backups), but you can also sync from one server to another via SSH rather than the rsync daemon. You may be like I was, and have discounted rsync for a long time due to the security risk imposed by running the “r” daemon on your servers. Need to sync some files? Locally or remotely? How about re-thinking an old friend, rsync? Well, I am going to share some good stuff that I have found, and actually have been very impressed with. So, where does that leave people like me and I am sure many of you out there that still have several computers to backup? We are caught in a kind of in between place. ![]() Now, that’s all well and good, but it’s very expensive and doesn’t exactly fit in the average home very well. Throw your data onto tapes inside a robotic tape library and manage it all from one central console. In the commercial world where you are backing up a data center full of servers and/or cubes laden with workstations, you buy commercial software like Veritas Backup Exec or NetBackup or Arcserve, etc. However, I am seeing more and more households with computers for mom and dad, the kids, grandparents and then some laptops on top of all that! Whew! Now we are getting into one major pile of work to try and back all that up. But what about when you have more than one computer? With prices falling and computer technology getting more and more prevalent in the home, it’s not un-common for households to have at least two computers in the form of a desktop and laptop. ![]() Still though, for saving the critical stuff like documents and pictures, CD’s and DVD’s are OK. Also, it’s quite nice for pointing and clicking what you want, and then seeing what the command it will use is, a learning tool.įor Debian, Ubuntu users you can find it in the repositories. This is (as you can probably guess from the name) a gui for the command line rsync, making it much more user friendly. Now, for folks that aren’t command like geeks, or maybe just want a quick and easy way to backup some files, there is a nifty little tool called grsync. This is great for command line addicts like myself, and especially because you can use it in scripts such that along with shared keys and keychain it becomes a powerful tool in your arsenal of sysadmin goodies. Previously I posted an article extolling the virtues of rsync, a very powerful command line tool for syncing files both locally and across networks via SSH. I know, I know, talking about backups might be boring, but one day a good backup will save your butt, I guarantee it. Greetings everyone, I am back with more information about backing up your files. Also, I currently have the script make the copy right next to the original file, but it would be easy to always copy the files to a backup directory somewhere if you wanted, the possibilities are endless! Now, if you don’t like the way I name my file copies, feel free to customize this to suit your needs. I symlink this to the command ‘bu’ in someplace like /usr/bin so it’s always in the path of whatever user I might be (myself, root, backup, whoever?), and then POW, it’s easy to backup files plus they are always named the same way – you just type “bu filename”. I created a simple script to backup the file specified and append a time and date stamp to the end of it. It’s not hard to do, but it gets old quick typing the same thing over and over again, plus you might not always name them the same thing or the same way, so now your backup files have different naming patterns and whatnot.ĭon’t worry, I have an easy solution. How many times have you been ready to edit a file and either don’t make a backup copy or make one but by now are real tired of typing out copy one file to another name with a date stamp and blah blah blah. This is something that I use on a regular basis on all of my servers.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |