]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Updated mirroring script to mirror Ceph
authorWido den Hollander <wido@42on.com>
Mon, 8 Feb 2016 10:53:24 +0000 (11:53 +0100)
committerWido den Hollander <wido@42on.com>
Mon, 29 Feb 2016 18:20:51 +0000 (19:20 +0100)
It adds new mirror locations which exist for Ceph

Signed-off-by: Wido den Hollander <wido@42on.com>
mirroring/mirror-ceph.sh

index ce44b7ba8bd18eaa41b1e8268fe9b9f60ad8d2c9..ef80a63f93e1a3931ac5b4644b9875b69f6af086 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+set -e
 #
 # Script to mirror Ceph locally
 #
@@ -10,8 +11,15 @@ SILENT=0
 # All available source mirrors
 declare -A SOURCES
 SOURCES[eu]="eu.ceph.com"
+SOURCES[de]="de.ceph.com"
+SOURCES[se]="se.ceph.com"
+SOURCES[cz]="cz.ceph.com"
 SOURCES[au]="au.ceph.com"
 SOURCES[us]="download.ceph.com"
+SOURCES[hk]="hk.ceph.com"
+SOURCES[fr]="fr.ceph.com"
+SOURCES[us-east]="us-east.ceph.com"
+SOURCES[us-west]="us-west.ceph.com"
 SOURCES[global]="download.ceph.com"
 
 function print_usage() {
@@ -77,8 +85,6 @@ fi
 #
 
 # Exclude all metadata files
-RET=0
-
 rsync ${RSYNC_OPTS} ${SOURCE_HOST}::ceph --recursive --times --links \
                                          --hard-links \
                                          --exclude Packages* \
@@ -90,17 +96,7 @@ rsync ${RSYNC_OPTS} ${SOURCE_HOST}::ceph --recursive --times --links \
                                          --exclude repodata/* \
                                          ${TARGET}
 
-if [ "$?" -ne 0 ]; then
-    RET=$?
-fi
-
 # Now also transfer the metadata and delete afterwards
 rsync ${RSYNC_OPTS} ${SOURCE_HOST}::ceph --recursive --times --links \
                                          --hard-links --delete-after \
-                                        ${TARGET}
-
-if [ "$?" -ne 0 ]; then
-    RET=$?
-fi
-
-exit $RET
+                                         ${TARGET}