Compare commits

..

No commits in common. "master" and "v0.0.3" have entirely different histories.

1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ KEEP_BACKUPS="${KEEP_BACKUPS:-7}"
S3_BUCKET="${S3_BUCKET:-selectel:backup_db}" S3_BUCKET="${S3_BUCKET:-selectel:backup_db}"
S3_PATH="${S3_PATH:-dot}" S3_PATH="${S3_PATH:-dot}"
ENVIRONMENT="${ENVIRONMENT:-prod}" ENVIRONMENT="${ENVIRONMENT:-prod}"
SLEEP=${SLEEP:-43200}
while true; do while true; do
echo "[$(date)] Starting database backup process..." echo "[$(date)] Starting database backup process..."
@ -20,7 +20,7 @@ while true; do
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[$(date)] ERROR: Failed to get database list!" echo "[$(date)] ERROR: Failed to get database list!"
sleep ${SLEEP} sleep 43200
continue continue
fi fi
@ -85,7 +85,7 @@ while true; do
echo "[$(date)] Current local backups:" echo "[$(date)] Current local backups:"
ls -lah ${BACKUP_DIR}/*.sql.gz 2>/dev/null || echo "No backups found" ls -lah ${BACKUP_DIR}/*.sql.gz 2>/dev/null || echo "No backups found"
echo "[$(date)] Next backup will run in $((${SLEEP} / 60 / 60 )) hours..." echo "[$(date)] Next backup will run in 12 hours..."
echo "=========================================" echo "========================================="
# Sleep for 12 hours (43200 seconds) # Sleep for 12 hours (43200 seconds)