Skip to main content

Rsync

rsync is a very versatile copying tool. When I was writing about backing up an lvm and restoring backups, I quickly forgot about rsync. Rsync is a remarkable tool that copies files from a source to a destination quickly comparing the file size and modification times and only transfers the changed files. It's called delta-transfer and it saves on bandwidth. However, I keep my initial backups locally but it does save on time if only those changed files or new files are copied to the destination.

The general syntax of the rsync command is
$ rsync -av <options> <source> <destination>.
It's very simple and elegant.

My lv's are mounted on ~/Music and ~/Videos while my backup directory is /backups/Musicbackups and /backups/Videosbackups. To use rsync :

$ rsync -av ~/Music/ /backups/Musicbackups

$ rsync -av ~/Videos/ /backups/Videosbackups

That trailing backslash "/" in the source directory tells rsync to ignore copying the directory and just copy what's inside the directory. I'm avoiding extra directory levels onto the destination directory.

This operation can be automated. I'll write about it on the next post.




Comments

Popular posts from this blog

Evolution Mail on GNOME 3.26

There's a slight change in the user interface. A To Do column now appears to the rightmost after the GNOME 3.26 update. Also there's a noticeable stability increase, what with goa-daemon stopping its RAM usage creep. I don't have to kill it every couple of hours.

Appindicator In Natty Ubuntu 11.04

Previously ranted about the blind alley Ubuntu 11.04 seemed to be leading us when it comes to some applications not being ready yet for the dropping of system tray.  What I should have done is press on. There are posts about editing a white list with a recommended GUI tool to help us out here , here and here . Like everything in Linux, there's a configuration file for it, if you can find it and if you have the inclination to go ninja. If not then there's dconf-editor. Download dconf-tools from Software Center. Navigate to desktop>unity>panel. Add your application in the white list. Then close the window. No save button. mmm. So far I have added Shutter, Dropbox and Keepassx in the white list.                Before...  After.

Jose Rizal, December 30, 1896 Execution by firing squad

From a photograph by Manuel Arias Rodriguez. He was executed for the crime of rebellion.