Consolidate backup storage to single mongo-backup directory
- Unify all backup scripts to use ./mongo-backup/ directory - Update db-backup--standalone.sh to store volume backups in mongo-backup/ - Update db-backup--swarm.sh to use mongo-backup as default directory - Update db-restore-from-backup--swarm.sh to look in mongo-backup/ - Update all header comments and documentation to reflect new location - Update .gitignore to ignore both backups/ and mongo-backup/ - Update README.md with consolidated backup directory paths This simplifies backup management by having all backup types in one location. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ set -euo pipefail
|
||||
# - Creates compressed tarball (.tar.gz) of the volume
|
||||
#
|
||||
# OUTPUT:
|
||||
# - Backup files stored in: ./backups/
|
||||
# - Backup files stored in: ./mongo-backup/
|
||||
# - Filename format: mongo-volume-backup-YYYY-MM-DD-HH-MM.tar.gz
|
||||
# - Automatic rotation: keeps newest 7 backups (configurable via KEEP env var)
|
||||
#
|
||||
@@ -45,7 +45,7 @@ docker service scale "$MONGO_SERVICE"=0
|
||||
TIMESTAMP=$(date +"%Y-%m-%d-%H-%M")
|
||||
|
||||
# backup directory and retention (can be overridden via env)
|
||||
BACKUP_DIR="${BACKUP_DIR:-backups}"
|
||||
BACKUP_DIR="${BACKUP_DIR:-mongo-backup}"
|
||||
KEEP="${KEEP:-7}"
|
||||
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
Reference in New Issue
Block a user