Vikas Nale 0bd733ecb8 - Handle GZIP in database backup process, so that all the backups are zipped before uploaded to s3
- Add fag to check if emails should be send on process complete like did for GIT and S3
2025-07-05 11:23:27 +05:30

57 lines
1.5 KiB
Bash

## Database Configuration
DB_HOST=147.93.98.152
DB_USER=devuser
DB_PASSWORD=xxxxxxx
DB_LIST_TO_BACKUP=MarcoBMSProd,MarcoBMSStage,gitea,mediawiki,redmine
DATABASE_CONFIGS = [
{
'DB_HOST': '147.93.98.152',
'DB_USER': 'devuser',
'DB_PASSWORD': 'AppUser@123$',
'DB_NAME': 'gitea,mediawiki,redmine',
'DB_TYPE': 'mysql' # Add database type if you have mixed databases (mysql, postgres, etc.)
},
{
'DB_HOST': '147.93.98.152',
'DB_USER': 'devuser',
'DB_PASSWORD': 'AppUser@123$',
'DB_NAME': 'MarcoBMSProd',
'DB_TYPE': 'mysql'
},
]
## Actionalble Blocks
UPLOAD_TO_S3=true
UPLOAD_TO_GIT=false
SEND_EMAIL=false
## AWS S3 Configuration
ACCESS_KEY=xxxxxxx
SECRET_KEY=xxxxxx
S3_BUCKET_NAME=xxxxxxxx
S3_REGION=us-east-1
## send mail once process is complete
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=marcoioitsoft@gmail.com
EMAIL_PASS= ""
EMAIL_SUBJECT="Database backup process"
EMAIL_RECEIVERS=vikas@marcoaiot.com,hr@marcoaiot.com
## Windows Specific Paths (if applicable, uncomment and adjust)
BACKUP_DIR=E:\Office\Marco\gitea\database\test
MYSQLDUMP_PATH=C:/Program Files/MySQL/MySQL Server 8.0/bin/mysqldump.exe
LOG_DIR=E:\Office\Marco\gitea\database\test\
LOG_FILE=E:\Office\Marco\gitea\database\test\backup_log.txt
## Linux Specific Paths (if applicable, uncomment and adjust)
# BACKUP_DIR=/var/lib/mysql-backups
# MYSQLDUMP_PATH=/usr/bin/mysqldump
# LOG_FILE=/var/www/apps/db-backup-script/logs/mysql_backup.log
# LOG_DIR=/var/www/apps/db-backup-script/logs