Yep, your right! thanks.

At 08:58 PM 12/30/2003, John Van Essen wrote:

On Tue, 30 Dec 2003, Wesley Joyce <[EMAIL PROTECTED]> wrote:
> Something very scary just happened to me while I was creating a ksh script
> to rsync mulitple FS between two hosts.  Here is the script, notice the 'i'
> at the end of rsync line, it got put there by mistake.  You also see the
> contents of $FSLIST cat'd below the script.  When I ran this, it started to
> delete files in root's home directory and place files from the fist FS,
> /banner, into root's home directory.  The resolved rsync line in the first
> instance would have been...
>
> rsync -vaz -e "ssh" --delete --exclude-from=/usr/local/adm/rsync.exclude
> /banner/ backenp650:/banneri

Nope.  The destination in your script was  "$DHOST:$FSi"
$FSi  is a variable named  FSi  which does not exist, so a null
string was used, leaving your destination as  "backenp650:"
And that would indeed be using the home directory on the destination.

Not bad rsync - bad you! ;-)

I would suggest always using --dry-run when debugging scripts like this
and then remove it when it looks like things will work as you intended.
--
        John Van Essen  Univ of MN Alumnus  <[EMAIL PROTECTED]>





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to