Can I use odrive to sync two local locations (like two external hard drives) with each other without an intermediate storage service?
This question came from a user and I thought it was pretty interesting. This would be an unconventional use for odrive, but it should be possible by using a “direct” storage integration like FTP, SFTP, or WebDAV with “sync to odrive” and folder sync rules.
The flow would be something like this. We’ll use OS X as the example OS because it has SFTP built in and available from the start:
Connect both external drives to your system
Enable SSH/SFTP on your system
Link your system to odrive via SFTP over localhost (127.0.0.1) or via your external IP, if you have the proper port routing.
Use “sync to odrive” to link to your SFTP server.
4a. If your local SFTP server is available via an external IP: Right-click->“sync to odrive” on a folder on external hard drive #1 and point it at a folder on external hard drive #2 but within the new SFTP link.
4b. Instead, if you are using a localhost (127.0.0.1): Use the odrive CLI to create a new ‘mount’, specifying the local path for the folder on external drive #1 and the “remote” path on external hard drive #2 (via the SFTP link). For example:
python ~/.odrive/bin/7334/odrive.py mount "/My_Local_Path" "/SFTPLinkNameHere/SFTPPathHere"
Right-click->sync on that same folder on external hard drive #1, select “Everything”, “Include Subfolders”, and “Save and apply to new files and folder”
That’s it! odrive should now be syncing external hard drive #1 to external hard drive #2 (and vice-versa) automatically.
Kinda cool, but also a little bit unusual
Strange. Does the data travel from SFTP to odrive server and back to the other hdd?
Data travel would be direct. It would actually never leave the local network.
I will just use rsync.