retry backup download because of flaky network

This commit is contained in:
Girish Ramakrishnan
2014-11-01 22:47:03 -07:00
parent cd6b034410
commit 61cbebf7ae
+1 -1
View File
@@ -42,7 +42,7 @@ supervisorctl stop all
if [ -n "$PROVISION_RESTORE_URL" ]; then
echo "Downloading backup: $PROVISION_RESTORE_URL"
rm -rf "$DATA_DIR/*" # DATA_DIR itself cannot be removed because it is mounted
curl -L "$PROVISION_RESTORE_URL" | tar -zxf - -C "$DATA_DIR"
curl --retry 5 --retry-delay 5 --max-time 600 -L "$PROVISION_RESTORE_URL" | tar -zxf - -C "$DATA_DIR"
fi
cd "$SRCDIR"