Using Rsync for real
Posted 3 September 2006, 22:44. (Filed under: Geek by Andrew)
In Rsync on Windows for strongspace I ran through installing and testing Rsync, but in order to use it effectively for backing up, I need to write something to do comprehensive, safe backups.
First off, options for rsync. I’m going to use:
rsync -rltvz "Pictures" username@subdomain.strongspace.com:backup
- -r: Recursive, so I get subdirectories as well
- -l: Copy symlinks as symlinks. Don’t know what this does on Windows, but if it stops Rsync following shortcuts, then it’s a good thing,
- -t: Preserve file timestamps.
- -v: Verbose – seems unnecessary until something goes wrong and you want to see exactly which files got transferred
- -z: Use compression, because processor cycles are cheap, and network bandwidth is a bottleneck
I didn’t put backup/Pictures as the destination, because then you get all your files in backup/Pictures/Pictures. I’m sure there are other ways of doing this with different slashes, but this will do me for now.
I currently have to change onto the correct drive where my files are for this to work. If I specify “G:/Pictures” (or “G:\Pictures”) then rsync thinks this is a remote source, which isn’t allowed. I’ll have to fix this when I run this lot as a script, but for the initial file transfer, from the command line, changing to g: first will do.
Talking of scripts, I’ll save those for another post, once my initial file transfer is complete. They’ll be written in Python, because Python’s what I do best.
* * *
< Windows Live Writer and rss_unlimited_categories plugin |
| Python vs. Ruby >