You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
603 B
21 lines
603 B
#!/bin/bash |
|
#Synchronisierung webapp zum Zielserver |
|
#Benutzer Variablen: |
|
#REMOTE_HOST ->Ziel-Hostname |
|
#REMOTE_USER ->Ziel-Benutzerkennung |
|
#REMOTE_DIR -> Zielpfad |
|
|
|
#TODO: in LOCAL_DIR gelöschte Dateien werden nicht im REMOTE_DIR gelöscht |
|
|
|
if [ "$LOCAL_DIR" = "" ] |
|
then |
|
LOCAL_DIR=`pwd` |
|
fi |
|
|
|
if [ "$REMOTE_HOST" = "" ] |
|
then |
|
rsync -L -rauvz --delete --include="*/" --include-from=includes.txt.sam --exclude="*" $LOCAL_DIR/* $REMOTE_DIR |
|
else |
|
rsync -L -rauvz --delete --include="*/" --include-from=includes.txt.sam --exclude="*" -e ssh $LOCAL_DIR/* "$REMOTE_USER"@"$REMOTE_HOST":$REMOTE_DIR |
|
fi |
|
|
|
|