Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to set up some scripts to perform nightly backups to a remote drive. I'm wondering if it is better (when considering both efficiency and data integrity) to:

A: rsync over an ssh tunnel, or

B: mount the drive locally over an ssh tunnel using a program such as ExpanDrive (http://www.expandrive.com/) and then rsync to the drive via its local mount point.

The back ups will be once daily, but I will probably have the drive connected most of the time for other uses.

Thanks for any help/suggestions.

share|improve this question

migrated from apple.stackexchange.com Aug 29 '11 at 16:45

This question came from our site for power users of Apple hardware and software.

2 Answers 2

up vote 0 down vote accepted

IMHO rsync over ssh would be better, however my recommendation is to start a rsync daemon on the other side and access it via secure VPN (openvpn, pptp). SSH encryption is hard on the cpu usage and depending on the size transferred, it might be a painful experience, however rsync in daemon mode has no encryption and is the fastest solution. Note that rsyncd (rsync in daemon mode) does not employ any encryption and authentication is very limited.

share|improve this answer
    
Unless he has a 100 Mbit pipe, SSH encryption will not be an issue. RSync compression may load the CPU a bit, but it'll probably still be faster then trying the same transfer uncompressed. –  Fake Name Aug 29 '11 at 11:21
1  
If you use openvpn, you're still doing encryption :-) If you don't want to use encryption, simply use rsh instead of ssh. You could also configure SSH to use the none cypher which would still allow you to have strong authentication via keys but wouldn't encrypt traffic. –  w00t Sep 15 '11 at 9:26
    
+1 for the none cypher, didn't know it. openvpn is less cpu-intensive than ssh, that's why I recommend it. –  mspasov Sep 16 '11 at 11:20

The RSync option will be FAR better.

When RSync is running over SSH, it actually uses both system's processors when doing file comparison.

Basically, rsync runs on both devices (literally, rsync connects to the remote device using ssh, executes the rsync binary file on the remote device, and then the two running executables interact over the ssh pipe), enabling files to be compared by having the two systems exchange file hashes, rather then transferring the entire file over the pipe, as would have to be done if you have the remote system mounted as a local drive.

This is obviously only an advantage when you are significantly speed-constrained, but most remote backups are.

Also, rsync when run over SSH compressed files as they are transfered, to speed up transfer times. I do not believe ExpanDrive does compression, but even if it does, it will significantly lose out when comparing files between the two systems.

RSync has a fundamentally different operating mode when performing local backups vs backups over a network. When working locally, it does not bother with hashing for file comparison, and does no file compression.


Running rsync as a daemon is really only useful when you have multiple clients backing up to the same device. It basically just lets you avoid the SSH overhead, and having to have each device have a SSH account.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.