feat(yedek): günlük MongoDB yedeği, geri yükleme ve bu bilgisayara kopya

- scripts/backup.sh: mongodump + bütünlük denetimi, son 14 yedek
- scripts/restore.sh: ayrı veritabanına geri yükleme ve sayım karşılaştırma
- scripts/backup-pull.sh + systemd zamanlayıcıları; kurulum docs/DEPLOY.md §6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 11:40:06 +03:00
parent 16535ad7f3
commit e4c8d971fc
12 changed files with 304 additions and 5 deletions
+2
View File
@@ -12,6 +12,8 @@
"dev:host": "concurrently -k -n api,web -c blue,green \"npm:dev:api\" \"npm --prefix frontend run dev -- --host\"",
"db:up": "docker compose -f docker-compose.dev.yml up -d --wait",
"db:down": "docker compose -f docker-compose.dev.yml stop",
"db:backup": "MONGO_CONTAINER=kakeibo-mongo DB_NAME=kakeibo_dev BACKUP_DIR=./backups scripts/backup.sh",
"db:restore": "MONGO_CONTAINER=kakeibo-mongo BACKUP_DIR=./backups scripts/restore.sh",
"db:seed": "echo 'Seed betiği Faz 1-4 arasında eklenecek.'",
"db:reset": "docker exec kakeibo-mongo mongosh --quiet --eval \"db.getSiblingDB('kakeibo_dev').dropDatabase(); db.adminCommand({listDatabases:1}).databases.filter(d => d.name.startsWith('kakeibo_test_')).forEach(d => db.getSiblingDB(d.name).dropDatabase()); print('kakeibo_dev ve test veritabanları sıfırlandı.')\"",
"test": "cd backend && cargo test && cd .. && npm --prefix frontend test",