WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   rsync prob (http://www.wcm.at/forum/showthread.php?t=228218)

CM²S 01.05.2008 12:30

rsync prob
 
hello,

FTPADM_EX="--exclude 'ftp-log/*' --exclude 'not_delivered/**/*' --exclude 'bin/*.ftp' --exclude 'bin/*.ack'"

# REMOTE HOST #######################################
REMOTEHOST="bla"
IDRSA="/etc/ssh/id_rsa-rsnc-6"

################################################## ####
# Only Root should do this!!!!
if (( `$ID -u` != 0 )); then { $ECHOBIN "Sorry, must be root. Exiting..."; exit; } fi
################################################## ####

if [ -d /etc/proftpd ]; then
$RSYNCBIN "ssh -p 922 -i $IDRSA" --update --delete $REMOTEHOST:$FTPADM $FTPADM --include '*/' $FTPADM_EX
.....
so weit so gut

Mein Problem ist , sobald ich die excludes in eine Variable geb und nicht direkt mit --exclude bla anhänge, werden die excludierten files trotzdem übertragen(.ack, .ftp)

was is der unterschied ??
knopf im kopf..

ciao
CM²S:heul:

CM²S 01.05.2008 13:24

FTPADM_EX="--exclude='ftp-log/*' --exclude='not_delivered/**/*' --exclude='bin/*.ftp' --exclude 'bin/*.ack'"

einfügen eines "=" macht keinen Unterschied

schade
CM²S

CM²S 01.05.2008 16:14

okok... selbst antwort...

FTPADM_EX='--exclude='ftp-log/* --exclude=not_delivered/**/* --exclude=bin/*.ftp --exclude=bin/*.ack'

und scho gehts...

mit #!/bin/sh -vx kann man sich den Durchlauf der scripts samt variablen anzeigen lassen...

wieder was gelernt....


ciao
CM²S


Alle Zeitangaben in WEZ +2. Es ist jetzt 05:01 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag