RE: Rsyncing Problem with - character!
Hi, Thanks for the quick response, I tried out what you said and this is what I found. This works: /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete "/export/home/tdf/Draft text - with Holley comments.doc" [EMAIL PROTECTED]:/home/tdf/ But no matter how you put it, I can't seem to escape out the destination file name. So this doesn't work /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete "/export/home/tdf/Draft text - with Holley comments.doc" "[EMAIL PROTECTED]:/home/tdf/Draft text - with Holley comments.doc" neither does this /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete /export/home/tdf/Draft\ text\ \-\ with\ Holley\ comments.doc [EMAIL PROTECTED]:/home/tdf/Draft\ text\ \-\ with\ Holley\ comments.doc at least not with my shell. This is a bit of a problem because I'm using rsync within a wrapper written in Perl and I really don't want to have to rewrite the Perl code to account for this limitation... can anyone think of a way to escape out the destination file name so that rsync does not complain? Your help is much appreciated, Regards, Tom -Original Message- From: Greger Cronquist [mailto:[EMAIL PROTECTED] Sent: 30 May 2003 11:12 To: Tom Freeman Subject: Re: Rsyncing Problem with - character! Usually, when using quotes, you skip ecape-characters. Depending on your shell, both /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete "/export/home/tdf/Draft text - with Holley comments.doc" "[EMAIL PROTECTED]:/home/tdf/Draft text - with Holley comments.doc" and /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete /export/home/tdf/Draft\ text\ \-\ with\ Holley\ comments.doc [EMAIL PROTECTED]:/home/tdf/Draft\ text\ \-\ with\ Holley\ comments.doc should work. I prefer the former, though you could simplify it to /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete "/export/home/tdf/Draft text - with Holley comments.doc" [EMAIL PROTECTED]:/home/tdf/ Regards Greger Tom Freeman wrote: >Dear Rsync Users, >Please can I have a bit of rsync advice? > >I am trying to rsync a file called. > >'Draft text - with Holley comments.doc' from machine a to machine b. > >Unfortunately this isn't working because I think rsync recognises the - >character and thinks it's an option. > >I have tried escaping this out as well as putting it all in " " but >neither seems to work though... > >This is the command I am running and the message I am getting. > >rsync: on remote machine: -: unknown option >rsync error: syntax or usage error (code 1) at main.c(875) >rsync: connection unexpectedly closed (0 bytes read so far) >rsync error: error in rsync protocol data stream (code 12) at io.c(150) > >/usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete >"/export/home/tdf/Draft text \- with Holley comments.doc" >[EMAIL PROTECTED]:/home/tdf/Draft text \- with Holley >comments.doc > >Any ideas what I can do to make this work? > >Cheers, >Tom > > > > -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Rsyncing Problem with - character!
Dear Rsync Users, Please can I have a bit of rsync advice? I am trying to rsync a file called. 'Draft text - with Holley comments.doc' from machine a to machine b. Unfortunately this isn't working because I think rsync recognises the - character and thinks it's an option. I have tried escaping this out as well as putting it all in " " but neither seems to work though... This is the command I am running and the message I am getting. rsync: on remote machine: -: unknown option rsync error: syntax or usage error (code 1) at main.c(875) rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(150) /usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu --delete "/export/home/tdf/Draft text \- with Holley comments.doc" [EMAIL PROTECTED]:/home/tdf/Draft text \- with Holley comments.doc Any ideas what I can do to make this work? Cheers, Tom -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Following symbolic links
It's ok i've found it out anyway I should have RTFM before posting I am sorry! In case anyone is interested here's the link. http://samba.anu.edu.au/ftp/rsync/rsync.html -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 - Original Message ----- From: "Tom Freeman" <[EMAIL PROTECTED]> To: "rsync list" <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 4:05 PM Subject: Following symbolic links > Hi, > Can anyone tell me if rsync can follow symbolic links? > Cheers, > Tom > -- > Tom Freeman > Web Developer > NISS - EduServ > +44 (0)1225 474371 > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html > -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Following symbolic links
Hi, Can anyone tell me if rsync can follow symbolic links? Cheers, Tom -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: exclude an entire dir from syncing ??
I think you just use the --exclude=/directory option Tom -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 - Original Message - From: "zenn" <[EMAIL PROTECTED]> To: "rsync" <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 2:04 PM Subject: exclude an entire dir from syncing ?? > hi all... > > is it possible to exclude an entire dir from syncing (to remote dir) if the > dir is in the sync path? > > regards > -z > > "The missing link between animals and the real human being is most likely > ourselves." > Austrian professor of biology and Nobel laureate (1973), Konrad Lorenz > > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html > -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Capturing output
Hi folks, I am running rsync via a perl script run in a cronjob. Here's the command i'm running my $message = `/usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu $directory $destination`; At the moment when I run the script it writes all output to the screen. I want to be able to write this data to a log file, so that if things don't work, I can find out what's wrong. I've tried &writeLog("$message"); but this misses out some of the stuff that rsync writes to the screen, i.e. the useful stuff actually, like if the file is not found on the machine. Any ideas how I can achieve this? Or is this a perl type question rather than something I can do with rsync...? cheers, Tom -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Newbie Question
Hi, I finally got rsync to work, it seems it didn't like being located in /usr/local/bin/rsync, so I created a symbolic link from there to /usr/bin/rsync and all worked fine! My next problem is that it is prompting me to enter a password each time I run it. I really want rsync to run automatically via a cronjob. Is there a way to send the password to rsync so I don't have to enter it manually every time? Many thanks, Tom -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 - Original Message - From: "wim delvaux" <[EMAIL PROTECTED]> To: "Tom Freeman" <[EMAIL PROTECTED]> Sent: Thursday, February 27, 2003 3:23 PM Subject: Re: Newbie Question > On Thursday 27 February 2003 16:19, you wrote: > > Hi, > > thanks for the reply, > > yeah i've checked the PATH and rsync is definately in the user tdf's path > > on both machines (i'm running rsync as using tdf). However it is not in > > roots path... but as i'm not running as root I guess this doesn't > > matter...? cheers, > > What you also could try is to run strace on the remote's sshd daemon. and see > what is going on > Perhaps the sequence is > sshd (as root) forks sshd forks rsync which setuid ? > > > > > Tom > > -- > > Tom Freeman > > Web Developer > > NISS - EduServ > > +44 (0)1225 474371 > > - Original Message - > > From: "wim delvaux" <[EMAIL PROTECTED]> > > To: "Tom Freeman" <[EMAIL PROTECTED]> > > Sent: Thursday, February 27, 2003 3:00 PM > > Subject: Re: Newbie Question > > > > > Make sure that the PATH variable is setup properly > > > > > > W > > -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Newbie Question
Hi, This is a very simple question I realise, but I hope maybe someone can just help me out. I am trying to do a very simple thing, just transfer a file from machine A to machine B using rsync with ssh. This is what i'm typing: bash-2.03# rsync -avvv --rsh="ssh -l tdf" [EMAIL PROTECTED]:/export/home/tdf/demofile.html demofile.html This is what I get: opening connection using ssh -l tdf machine.niss.ac.uk -l tdf rsync --server --sender -vvvlogDtpr . /export/home/tdf/demofile.html [EMAIL PROTECTED]'s password: bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(150) _exit_cleanup(code=12, file=io.c, line=150): about to call exit(12) Basically it seems to go wrong after logging into the remote machine when it says "rsync: command not found". rsync is definately installed on both machines and is in the user tdf's environment path. So I don't understand why it says "rsync: command not found"...? Any help getting this sorted would be VERY much appreciated...? Many thanks, Tom -- Tom Freeman Web Developer NISS - EduServ +44 (0)1225 474371 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html