Syncing folders over network -- syntax

reini rrumberger at web.de
Mon Apr 4 09:59:16 UTC 2011


On Montag 04 April 2011, 09:25:01, Georgi Kourtev wrote:
> On Friday, April 01, 2011 14:52:57 Reinhold Rumberger wrote:
> > On Freitag 01 April 2011, 12:53:03, Alvin wrote:
> > > On Friday 01 April 2011 11:15:59 Georgi Kourtev wrote:
> > > > Hello,
> > > > 
> > > > I am trying to sync one folder of my PC with a network folder under
> > > > samba. Is this the correct syntax:
> > > > 
> > > > rsync -r -t -v --progress -s /home/Documents/Folder smb://PC-
> > > > desktop/share/Documents
> > > > 
> > > > I have error when using the above. The output of rsync is
> > > > 
> > > > ssh: Could not resolve hostname smb: Name or service not known
> > > > rsync: connection unexpectedly closed (0 bytes received so far)
> > > > [sender] rsync error: unexplained error (code 255) at io.c(601)
> > > > [sender=3.0.7] Rsync process exit status: 255
> > > 
> > > You can't use KIOslaves (smb://) at the command line (as far as I
> > > know).
> > > 
> > > There are different solutions here:
> > > - Mount the share and rsync (only solution when destination is
> > > Windows): # mount -t cifs -o username=<insert-here>
> > > //pc-desktop/share/Documents /mnt # rsync -rt --progress
> > > /home/Documents/Folder/ /mnt/
> > > 
> > > - Set up an rsync server or use rsync over ssh
> > > # rsync -rt --progress /home/Documents/Folder/ rsync://pc-
> > > desktop/share/Documents/
> > > # rsync -rt --progress -e ssh /home/Documents/Folder/ pc-
> > > desktop:/share/Documents/
> > 
> > Actually, seeing as how rsync is closely affiliated with samba, you can
> > use rsync with samba. I believe a samba host is addressed as
> > samba:<host>/<path> in rsync, but I might be mistaken. See man rsync for
> > details.
> > 
> >   --Reinhold
> 
> This is what I thought too.  However none of the syntaxes proposed do not
> got the job done.  Other ideas?

I'm pretty sure I saw a colleague using rsync with a windows share, so I guess 
I'll ask him whenever I see him next and he actually has some time.

Until then, if the method Alvin describes doesn't work for you (and there are 
some good reasons why it might not), do you have admin privileges on the 
remote machine? If so, you might want to set up an rsyncd and use that. This 
would likely cut down on network traffic, too.

  --Reinhold




More information about the kubuntu-users mailing list