coren has submitted this change and it was merged. Change subject: Dump: make labs-rsync-cron.sh paranoid ......................................................................
Dump: make labs-rsync-cron.sh paranoid Check that the destination mount (/mnt/dumps) is there before trying the copy and bail out if it doesn't seem to be there. Change-Id: I3b69bf5c87d29e94c947ccd6125592ba426f1c8c --- M modules/dataset/files/labs/labs-rsync-cron.sh 1 file changed, 18 insertions(+), 10 deletions(-) Approvals: ArielGlenn: Looks good to me, but someone else must approve coren: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dataset/files/labs/labs-rsync-cron.sh b/modules/dataset/files/labs/labs-rsync-cron.sh index af93485..e8e1544 100644 --- a/modules/dataset/files/labs/labs-rsync-cron.sh +++ b/modules/dataset/files/labs/labs-rsync-cron.sh @@ -1,13 +1,21 @@ #!/bin/bash running=`pgrep -u root -f 'python /root/wmfdumpsmirror.py --remotedir /data/xmldatadumps/public'` -if [ -z "$running" ]; then - python /usr/local/bin/wmfdumpsmirror.py --remotedir /data/xmldatadumps/public --localdir /mnt/dumps/public --filesperjob 50 --sizeperjob 5G --workercount 1 --rsynclist rsync-filelist-last-2-good.txt.rsync --rsyncargs -rlptq -fi -running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/'` -if [ -z "$running" ]; then - /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/ -fi -running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/'` -if [ -z "$running" ]; then - /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/ + +if [ -d /mnt/dumps/lost+found ]; then + + if [ -z "$running" ]; then + python /usr/local/bin/wmfdumpsmirror.py --remotedir /data/xmldatadumps/public --localdir /mnt/dumps/public --filesperjob 50 --sizeperjob 5G --workercount 1 --rsynclist rsync-filelist-last-2-good.txt.rsync --rsyncargs -rlptq + fi + running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/'` + if [ -z "$running" ]; then + /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/ + fi + running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/'` + if [ -z "$running" ]; then + /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/ + fi + +else + echo "$0: mount doesn't appear there. Bailing out!" >&2 + exit 1 fi -- To view, visit https://gerrit.wikimedia.org/r/155076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b69bf5c87d29e94c947ccd6125592ba426f1c8c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren <[email protected]> Gerrit-Reviewer: ArielGlenn <[email protected]> Gerrit-Reviewer: coren <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
