Re: scripting rsync ssh port issue
Paul has addressed the errant dollar signs, the misspelled $DST, and two possible workarounds for the quoting issue, but I would like to explain the quoting issue a bit further. On Fri, 2008-04-04 at 11:23 -0400, Sterling Windmill wrote: > RSYNC_OPTIONS="-aH --delete --numeric-ids -e \'ssh -p 2292\'" > RSYNC="ionice -c3 rsync $RSYNC_OPTIONS" > > $SOURCE=/some/dir > [EMAIL PROTECTED]:/some/dir > > $RSYNC --progress "$SOURCE" "$DST" > Missing trailing-' in remote-shell command. > rsync error: syntax or usage error (code 1) at main.c(364) > [sender=3.0.0] > > If I paste the command directly into a command line, the command works > properly. First, get rid of the backslashes in $RSYNC_OPTIONS because they are being taken literally; single quotes need no escaping inside double quotes. Second, when bash expands a variable like $RSYNC, it takes quotes in the variable's value literally; they do not protect spaces in the expanded value from word splitting. Thus, bash is splitting your -e value into three pieces, the first and last of which contain unmatched single quotes, hence the rsync error. You could fix this by using "eval" instead of word-splitting expansion, but that would be fragile with respect to shell metacharacters in the arguments to be passed to rsync. Alternatively... > I've also tried taking the advice mentioned here and using an array > instead of a variable, but to no avail: > > http://wooledge.org:8000/BashFAQ/050 Arrays are generally the best solution, but it takes some care to use them correctly. Here's your script rewritten to use arrays: --- RSYNC_OPTIONS=(-aH --delete --numeric-ids -e 'ssh -p 2292') RSYNC=(ionice -c3 rsync "[EMAIL PROTECTED]") SOURCE=/some/dir [EMAIL PROTECTED]:/some/dir : "[EMAIL PROTECTED]" --progress "$SOURCE" "$DEST" --- Matt signature.asc Description: This is a digitally signed message part -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: scripting rsync ssh port issue
On Fri 04 Apr 2008, Sterling Windmill wrote: > I am modifying a bash script of mine to issue an rsync to a remote host with > a non-standard ssh port. > > Unfortunately, no combination of "bashisms" seems to make it work properly. > > Code snippet: > > ... > > RSYNC_OPTIONS="-aH --delete --numeric-ids -e \'ssh -p 2292\'" > RSYNC="ionice -c3 rsync $RSYNC_OPTIONS" Nested quotations usually do something else than you'd expect... > $SOURCE=/some/dir > [EMAIL PROTECTED]:/some/dir Are you sure about the above lines? I'd lose the $ in the 1st column. (Or was that your shell prompt...) > $RSYNC --progress "$SOURCE" "$DST" That will probably present the arguments to rsync differently then expected. A simple test: $ cat showargs.sh #!/bin/sh for i; do echo "ARG: $i" done $ RSYNC_OPTIONS="-aH --delete --numeric-ids -e \'ssh -p 2292\'" $ RSYNC="ionice -c3 rsync $RSYNC_OPTIONS" $ SOURCE=/some/dir $ [EMAIL PROTECTED]:/some/dir $ ./showargs.sh $RSYNC --progress "$SOURCE" "$DST" ARG: ionice ARG: -c3 ARG: rsync ARG: -aH ARG: --delete ARG: --numeric-ids ARG: -e ARG: \'ssh ARG: -p ARG: 2292\' ARG: --progress ARG: /some/dir ARG: (With $DEST instead of $DST it shows [EMAIL PROTECTED]:/some/dir as the last ARG, instead of the empty one now.) I wish you much pleasure in trying to solve this in this way :-) I'd create a ssh-2292 commmand that looks like: #!/bin/sh exec /usr/bin/ssh -p 2292 "$@" and pass that to the -e option. Alternatively you could create an entry for that host in ~/.ssh/config and put the port in there. Paul Slootman -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
scripting rsync ssh port issue
I am modifying a bash script of mine to issue an rsync to a remote host with a non-standard ssh port. Unfortunately, no combination of "bashisms" seems to make it work properly. Code snippet: ... RSYNC_OPTIONS="-aH --delete --numeric-ids -e \'ssh -p 2292\'" RSYNC="ionice -c3 rsync $RSYNC_OPTIONS" $SOURCE=/some/dir [EMAIL PROTECTED]:/some/dir $RSYNC --progress "$SOURCE" "$DST" ... I've tried multiple means of achieving the same goal, but I always get the following error: Missing trailing-' in remote-shell command. rsync error: syntax or usage error (code 1) at main.c(364) [sender=3.0.0] If I paste the command directly into a command line, the command works properly. The issue was discussed here as well, but I don't believe a true solution was found: http://ubuntuforums.org/showthread.php?s=37eab16339f084c49ee03d56a48ddc32&t=721735 I've also tried taking the advice mentioned here and using an array instead of a variable, but to no avail: http://wooledge.org:8000/BashFAQ/050 Any advice, has anyone accomplished this? Sterling Windmill Systems and Technology Phone: 586-752-9671 Ext 161 Fax: 586-752-6589 www.custdata.com CONFIDENTIALITY NOTICE: This email contains information from the sender that may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise protected from disclosure. This email is intended for use only by the person or entity to whom it is addressed. If you are not the intended recipient, any use, disclosure, copying, distribution, printing, or any action taken in reliance on the contents of this email, is strictly prohibited. If you received this email in error, please contact the sending party by replying in an email to the sender, delete the email from your computer system and shred any paper copies of the email you printed. <>-- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
DO NOT REPLY [Bug 5373] rsync uses more space in destination even with -S specified
https://bugzilla.samba.org/show_bug.cgi?id=5373 --- Comment #1 from [EMAIL PROTECTED] 2008-04-04 09:13 CST --- (In reply to comment #0) > The target > filesystems continually run out of free space even though they are larger in > size. Do I understand you correctly: you are copying a source filesystem to a destination filesystem that is larger and contains nothing but the copied data, so you expect the data to fit, but it doesn't? Be sure to use --delete to delete any extraneous files from the destination, and if the source contains hard-linked files, use -H to preserve the hard links. If the problem persists, you'll have to work a bit harder to figure out where the expansion is occuring; follow Wayne's procedure in "thing to check" #3 in bug 3485 comment 3 to generate and compare listings of the source and destination filesystems. > I am unable to use the sparse flag on rsync as the application relies on this > fact. What "fact" are you referring to? Sparse source files will take up more space on the destination unless you use the -S option. If you have sparse source files but your application won't let you preserve their sparsity, you need more space on the destination; there is nothing rsync can do about that. If none of the source files are sparse, -S shouldn't matter. > I am unsure if the following highlights the possible problem but I have > attached an example of the AIX fileplace command showing an application file > and the first time I have copied this file using rsync. I'm not familiar with fileplace, but just looking at the output I see no evidence of expansion of any kind. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug, or are watching the QA contact. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe
i now tested it on a fresh installes sun with Solaris 10 sparc without installing any patches and rsync works. If i install all patches the error message comes. Any idea? Mit freundlichen Grüßen Sebastian Kösters systems architect Trade Haven GmbH In der Steele 37, 40599 Düsseldorf T +49 211 749659 14mailto:[EMAIL PROTECTED] F +49 211 749659 29http://www.tradehaven.de Geschäftsführer: Michael Heck | Oliver Wagner Handelsregister Düsseldorf: HRB 53379 Wayne Davison schrieb: On Mon, Mar 31, 2008 at 10:48:18AM +0200, Sebastian Kösters wrote: On the sun the command (in ps ef) went away after about 2 Minutes with the error message I sent you. That makes it look like a connection failure then. Perhaps a firewall is closing an idle connection? e.g. I once had a Linksys box that would close my ssh connections for me unless I set a keep-alive option in the protocol. ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync error
On Fri, 4 Apr 2008 17:11:25 +0530 "Kaushal Shriyan" <[EMAIL PROTECTED]> wrote: > hi steven > > I am getting the below error now > > building file list ... rsync: pop_dir "/root" failed: Permission > denied (13) rsync error: errors selecting input/output files, dirs > (code 3) at flist.c(1356) [sender=2.6.9] Check the permissions on the directory, and ensure that the user which rsync is running as can access that directory. -- Daniel Maher signature.asc Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync error
On Fri, Apr 4, 2008 at 4:51 PM, Steven Hartland <[EMAIL PROTECTED]> wrote: > Log file is likely locked. > > - Original Message - From: "Kaushal Shriyan" > <[EMAIL PROTECTED]> > > > > > hi > > > > I have the script http://pastebin.com/d4b062d28 and the roots cron > > entry are as below > > > > 30 2 * * * su sms /usr/local/bin/testrsync_mysql.sh > > > > I am getting the below error > > > > building file list ... rsync: opendir "/var/lib/mysql/wordpress" > > failed: Permission denied (13) done mysql/ib_logfile0 > > mysql/ib_logfile1 > > Killed by signal 2. > > rsync error: unexplained error (code 255) at rsync.c(276) [sender=2.6.9] > > > > Any clue as what is happening > > > > > > This e.mail is private and confidential between Multiplay (UK) Ltd. and the > person or entity to whom it is addressed. In the event of misdirection, the > recipient is prohibited from using, copying, printing or otherwise > disseminating it or any information contained in it. > In the event of misdirection, illegible or incomplete transmission please > telephone +44 845 868 1337 > or return the E.mail to [EMAIL PROTECTED] > > hi steven I am getting the below error now building file list ... rsync: pop_dir "/root" failed: Permission denied (13) rsync error: errors selecting input/output files, dirs (code 3) at flist.c(1356) [sender=2.6.9] Thanks and Regards Kaushal -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync error
Log file is likely locked. - Original Message - From: "Kaushal Shriyan" <[EMAIL PROTECTED]> hi I have the script http://pastebin.com/d4b062d28 and the roots cron entry are as below 30 2 * * * su sms /usr/local/bin/testrsync_mysql.sh I am getting the below error building file list ... rsync: opendir "/var/lib/mysql/wordpress" failed: Permission denied (13) done mysql/ib_logfile0 mysql/ib_logfile1 Killed by signal 2. rsync error: unexplained error (code 255) at rsync.c(276) [sender=2.6.9] Any clue as what is happening This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to [EMAIL PROTECTED] -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync error
hi I have the script http://pastebin.com/d4b062d28 and the roots cron entry are as below 30 2 * * * su sms /usr/local/bin/testrsync_mysql.sh I am getting the below error building file list ... rsync: opendir "/var/lib/mysql/wordpress" failed: Permission denied (13) done mysql/ib_logfile0 mysql/ib_logfile1 Killed by signal 2. rsync error: unexplained error (code 255) at rsync.c(276) [sender=2.6.9] Any clue as what is happening Thanks and Regards Kaushal -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Rsync 3.0.1 released
I have released rsync 3.0.1. This is a bug-fix release, which also includes fixes/improvements for several issues in the daemon-exclude code. To see a full summary of the changes since 3.0.0, visit this link: http://rsync.samba.org/ftp/rsync/src/rsync-3.0.1-NEWS You can download the source tar file and its signature from here: http://rsync.samba.org/ftp/rsync/src/rsync-3.0.1.tar.gz http://rsync.samba.org/ftp/rsync/src/rsync-3.0.1.tar.gz.asc The patches directory is now in a separate tar file (for those that want it): http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.1.tar.gz http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.1.tar.gz.asc ..wayne.. signature.asc Description: Digital signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html