feat: Add database backup system

- Add Dockerfile.backup for backup container
- Add backup.py script with PostgreSQL backup functionality
- Add backup service to docker-compose.prod.yml
- Update env.production.example with backup configuration
- Add db/README.md with backup system documentation

Features:
- Automated daily backups (07:30, 18:00)
- Local and FTP remote backup support
- 7-day retention policy
- PostgreSQL 16 client for waceplm database
This commit is contained in:
2025-11-12 18:19:54 +09:00
parent 8cccd9db2c
commit ba026842f7
5 changed files with 661 additions and 5 deletions

View File

@@ -1,15 +1,15 @@
# PLM ILSHIN 운영환경 설정
# WACE PLM 운영환경 설정
# 애플리케이션 환경
NODE_ENV=production
# 데이터베이스 설정
DB_URL=jdbc:postgresql://localhost:5432/ilshin
DB_URL=jdbc:postgresql://wace-plm-db:5432/waceplm
DB_USERNAME=postgres
DB_PASSWORD=your_production_password
# PostgreSQL 환경 변수
POSTGRES_DB=ilshin
POSTGRES_DB=waceplm
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_production_password
@@ -26,5 +26,19 @@ DEBUG=false
SSL_ENABLED=true
# 도메인 설정
DOMAIN=ilshin.esgrin.com
ALT_DOMAIN=autoclave.co.kr
DOMAIN=waceplm.esgrin.com
# 백업 설정
POSTGRES_HOST=wace-plm-db
POSTGRES_DOCKER_PORT=5432
LOCAL_BACKUP_PATH=/backups/local
BACKUP_RETENTION_DAYS=7
BACKUP_TIME_AM=07:30
BACKUP_TIME_PM=18:00
# FTP 백업 설정 (NAS Backup SMB Configuration)
FTP_HOST=effectsno1.synology.me
FTP_USER=esgrin-mes-backup
FTP_PASSWORD=UyD12#11YHnn
FTP_PATH=esgrin-mes-backup
FTP_PORT=2112