Merge branch 'master' into lildude/update-verify-routes
This commit is contained in:
Коммит
267dcac199
|
@ -137,10 +137,10 @@ if [ "$GHE_BACKUP_STRATEGY" != "cluster" ]; then
|
|||
server=$host
|
||||
fi
|
||||
cat $routes_list | awk -v tempdir="$tempdir" -v server="$server" '{ for(i=2;i<=NF;i++){ server != "" ? host=server : host=$i; print $1 > (tempdir"/"host".rsync") }}'
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping repositories backup ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -105,10 +105,10 @@ if [ "$GHE_BACKUP_STRATEGY" != "cluster" ]; then
|
|||
server=$host
|
||||
fi
|
||||
cat $routes_list | awk -v tempdir="$tempdir" -v server="$server" '{ for(i=2;i<=NF;i++){ server != "" ? host=server : host=$i; print $1 > (tempdir"/"host".rsync") }}'
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping storage backup ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -119,10 +119,10 @@ bm_end "$(basename $0) - Fetching routes"
|
|||
|
||||
bm_start "$(basename $0) - Processing routes"
|
||||
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping pages restore ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -129,10 +129,10 @@ bm_end "$(basename $0) - Fetching routes"
|
|||
bm_start "$(basename $0) - Processing routes"
|
||||
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
|
||||
cat $routes_list | awk '{ n = split($1, p, "/"); printf p[n] " /data/repositories/" $1; $1=""; print $0}' > $to_restore
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync && cat $to_restore)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping repositories restore ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -122,10 +122,10 @@ bm_end "$(basename $0) - Transferring routes"
|
|||
bm_start "$(basename $0) - Processing routes"
|
||||
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
|
||||
cat $routes_list | awk '{ n = split($1, p, "/"); i = p[n]; sub(/\.git/, "", i); printf i " /data/repositories/" $1; $1=""; print $0}' > $to_restore
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync && cat $to_restore)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping gists restore ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -111,10 +111,10 @@ bm_end "$(basename $0) - Fetching routes"
|
|||
|
||||
bm_start "$(basename $0) - Processing routes"
|
||||
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print substr($1,1,1) "/" substr($1,1,2) "/" substr($1,3,2) "/" $1 > (tempdir"/"$i".rsync") }}'
|
||||
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
|
||||
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
|
||||
bm_end "$(basename $0) - Processing routes"
|
||||
|
||||
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
|
||||
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
|
||||
echo "Warning: no routes found, skipping storage restore ..."
|
||||
exit 0
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче