We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4412b00 commit 080d330Copy full SHA for 080d330
scripts/db-backup.sh
@@ -0,0 +1,11 @@
1
+#!/usr/bin/env bash
2
+set -e
3
+
4
+TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
5
+BACKUP_DIR="backups/mongo_$TIMESTAMP"
6
7
+mkdir -p $BACKUP_DIR
8
+docker exec mongo mongodump --db fullstack_app --out /data/db-dump
9
+docker cp mongo:/data/db-dump $BACKUP_DIR
10
11
+echo "✅ Backup complete: $BACKUP_DIR"
0 commit comments