LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   File sync between ubuntu and windows (https://www.linuxquestions.org/questions/ubuntu-63/file-sync-between-ubuntu-and-windows-902628/)

sburnay 09-12-2011 12:48 PM

File sync between ubuntu and windows
 
Howdy!

I'm intending to mount an Ubuntu server, on which windows clients can connect and make a backup-like sharing of a phew dirs.

The solution I'm familiar with, would be to have an fpt server (VSFTPD with virtual users), forcing the users to connect and synch the data mannually.

However, the ideal solution would be to implement an automatic synch mechanism, so that the phew users (about 10) wouldn't have to do it themselves.

I've heard of Unison, but I'm not familiar with it and I'm afraid I'll lose a endless hours around .conf's not being able to provide the desired functionality.

With my best regards,
sburnay

jv2112 09-15-2011 04:17 AM

:twocents:

I would suggest rsync.

http://www.trueblade.com/knowledge/u...ws-notebook-pc


Just set up a script to pull the data and set as a cron job when it makes sense for the 10 users.

sburnay 09-15-2011 12:43 PM

Yes, thank you for the rSync suggestion, from what I've read seems good.

Problems arose after installing the cwrsync on a 64bit Windows7 and tried to run a simple backup .bat
Code:

@ECHO OFF

SETLOCAL
SET CWRSYNCHOME=%PROGRAMFILES(x86)%\CWRSYNC
SET CYGWIN=nontsec
SET HOME=%HOMEDRIVE%%HOMEPATH%
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%\BIN;%PATH%

rsync -av /"Users"/sburnay/"TryIT"/"Sebastião Burnay.xlsx" sburnay@172.30.10.81:/home/sburnay/TryIT

And when I ran it I got the error:
Code:

Could not create directory '/cygdrive/j/.ssh'.
The authenticity of host '172.30.10.81 (172.30.10.81)' can't be established.
ECDSA key fingerprint is e3:a7:fa:c7:7c:83:02:65:15:9d:f7:b4:aa:18:d1:39.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/cygdrive/j/.ssh/known_hosts)
.
sburnay@172.30.10.81's password:
sending incremental file list
rsync: change_dir "/Users/sburnay/TryIT" failed: No such file or directory (2)

sent 12 bytes  received 12 bytes  0.98 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.8]

Well, I don't know where to «strike» the error because it seems to be possible it came from a lot of origins...

jv2112 09-15-2011 05:54 PM

I don't have allot of experience with Windows machines. Gave up after Windoze ME.

But the error is pointing to two areas

---> directories you are trying to work with don't exist. rsync won't create directories. I don't see the variable you are using in your posts. I would check all path's. Maybe just a simple typo.

---> The other potential opportunity is the id is not being accepted. I would try two things
add the -e switch and tell rsync you are using ssh. ie rsync -ave ssh .....
the second would be to make sure the keys are copied to the 10 users machines. Look at ssh-keygen then ssh-copy-id option.
This may help.

http://www.thegeekstuff.com/2010/09/...mand-examples/


All times are GMT -5. The time now is 02:26 AM.