DEFINITIONS

Definitions More Info.
Definition ID825
TitleLINUX
CategoryNOTES
Definitionrsync birden fazla - more than once cygwin
Definition Descriptionhttps://superuser.com/questions/1252649/running-multiple-rsync-executions-in-script
ÖRNEK : Aşağıdaki örnek cygwin64 üzerinde çalışır.
=======
#!/bin/bash
#https://superuser.com/questions/1252649/running-multiple-rsync-executions-in-script logpath="./logs/"
current_time=$(date "+%Y%m%d%H%M%S")

rsync -vrt /cygdrive/Z/ /cygdrive/T/BACKUPS/ > "$logpath"sql01"$current_time".log && rsync -vrt /cygdrive/X/* /cygdrive/T/BACKUPS/Evrim/ > "$logpath"Evrim"$current_time".log && rsync -vrt /cygdrive/j/* /cygdrive/T/BACKUPS/JiraSQL/ > "$logpath"jira"$current_time".log && rsync -vrt /cygdrive/W/* /cygdrive/T/BACKUPS/PLM/ > "$logpath"plm"$current_time".log

AÇIKLAMA aşağıdadır: Running rsync && rsync will start the second rsync after the first one completes. You want rsync& Explanation: a && b a runs, b runs next only if a competes successfuly a || b a runs, b runs next only if a completes UNsuccessfully a; b a runs, b runs next no matter the success a& b a runs, gets sent into the background. This is equivalent to running a, typing ctrl-Z and the running bg So if you want your programs to run at the same time, replace the &&s with single &
RecordBycunay
Record Date03-04-2018 19:55:58
Düzenle
Kopyala
Sil