Page 1 of 1

How to use rsync when running NAT?

Posted: 4. Jul 2011, 12:44
by DavidA
Hi

I am running VirtualBox 4.0.8 on a Windows 7 64-bit host with a Centos 5.5 guest.

I am happily using shared folders between the guest and the host.

I need to run rsync between the guest VM and a network drive that is accessible to the host, in order to synchronise a shared folder with the network drive. My guest VM uses NAT. Our IT people do not want us to use Bridge networking because that will open the VM up to the internet and they will then have to maintain secuirty updates on the VM.

If I try to mount the remote drive I get:

mount: can't find <remote drive> in /etc/fstab or /etc/mtab

Would it be possible to support rsync with NAT?

(The alternative is to do the directory synchronisation from Windows, but we need to support working over a slow ADSL connection and have found that RoboCopy is too slow in that environment.)

Best regards

David

Re: How to use rsync when running NAT?

Posted: 4. Jul 2011, 21:29
by Sasquatch
DeltaCopy is the rsync method for Windows. You can also use cygwin to run rsync in Windows.
The mount command failed, because you didn't specify it entirely. When you mount things that are not noted in fstab, you have to specify all the parameters. This means you enter the following:

Code: Select all

mount -t <file system type, probably cifs, ask your IT dept> //remote/location /local/mount/point
You may have to use -o to specify additional options like username and password.

To use rsync from the VM using NAT, you have to think about how it connects. If it's just the client, then it should not be required to make any changes. Else you have to forward ports using the port forward options.
As for the security issues that may come when using bridged: it's not as severe if it was a Windows machine. Linux is very secure compared to Windows, so it doesn't matter much if you have it on NAT or bridged setting.

Re: How to use rsync when running NAT?

Posted: 5. Jul 2011, 13:13
by DavidA
Thanks for your reply - it was very helpful.