Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rsync script error



Good afternoon Blu,
    I 've been doing a hit and miss with a rsync script I wrote that is not working.

    Appreciate a review from more experience eyes and suggested reference -

    RHEL system-Red Hat Enterprise Linux Server release 5.4 (Tikanga)


    I have an NFS mount from a NET APP filer that is running ".snapshots" of the directory mounted on
/mnt/external -- wish to sync to /data/biomicro/external AND skip .snapshots - on mnt/external- 
send email message - script to be run from cron.daily 



   Combining the --delete and exclude statements is confusing. 


#!/bin/bash
/usr/bin/rsync -avz --delete / --exclude ".snapshot"  /mnt/external/. /data/biomicro/external  >> /var/log/rsync/backup.log mail -s "back cron job external ran" sgoldman-3s7WtUTddSA at public.gmane.org
~
When I test from /root   - I error out. 
]
rsync: -s: unknown option
rsync error: syntax or usage error (code 1) at main.c(1231) [client=2.6.8]
[root@ ~]# 



Thanks for your input,



Stephen

everyday is a learning experience



http://everythinglinux.org/rsync/
Using Rsync Itself
  Now on to actually using, or initiating an rsync transfer with rsync itself. It's the same binary as the daemon, just without the "--daemon" flag. It's simplicity is a virtue. I'll start with a commandline that I use in a script to synchronize a Web tree below. 

rsync --verbose  --progress --stats --compress --rsh=/usr/local/bin/ssh \
      --recursive --times --perms --links --delete \
      --exclude "*bak" --exclude "*~" \
      /www/* webserver:simple_path_name








Stephen Goldman
Systems Administrator
Department of Biology
Massachusetts Institute of Technology
31 Ames Street, Cambridge, MA 02139
sgoldman-3s7WtUTddSA at public.gmane.org, (617) 452-2595






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org