novice:  options for data sync / mounts

georgia used Ask the Experts™
Novice Linux user...  

I have two systems on different networks, only connected over the internet.  From system #1, I need a way to either mount a directory from system #2, or do something in a very efficient manner to keep data from a certain directory on system #1 in sync with system #2.  I do not have root on these boxes and cannot so something drastic like rsync.  Running a shell script from cron would be an option, but I don't want to have to download the entire directory every time I connect.. just the changes would be nice... so

1.  Can I create a mount across the internet between these boxes?

2.  Is there something like rsync that I could use to only replicate the changes?

Thanks in advance....
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2005
Using rsync is the most efficient method as it will only transfer changed files between the two systems. And it isn't necessary to have root privs to do this (assuming that you own the content of the directory(s) on both systems. As as example (using ssh as the secure transport protocol), assume that I have a local directory (~/web-src) and on the remote I have /home/web/htdocs. The local system is the "master" and I want to sync the remote directory to the local dir so that they are identical. That is done with:

rsync --rsh=ssh -Cav --delete ~/web-src remote.dom.tld:/home/web/htdocs

That assumes the login names are the same on both systems. If they aren't I can use:

rsync --rsh=ssh -Cav --delete ~/web-src user@remote.dom.tld:/home/web/htdocs

To allow the command to be using in a cron script you need to set up a public ssh key on the remote. For details on the use of rsync and ssh see; 'man rsync' and 'man ssh'


Thanks!  sorry it took so long!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial