-
Notifications
You must be signed in to change notification settings - Fork 3
Add Database Backup Feature (Disabled by Default) and Use backup User for Multi-DB Support #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Database Backup Feature (Disabled by Default) and Use backup User for Multi-DB Support #8
Conversation
wsmirnow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job overall, thank you @NUZAT-TABASSUM
There are some comments below, please take a look at it. Please add documentation of the new arguments in the README. And please add an DB restore script too.
|
Hello @wsmirnow, I have updated the codes based on your comments, updated README and added a DB restore script. Please re-review. |
New features:
The backup feature is disabled by default. To enable it, set
database_backup_enabled: trueand provide a value fordatabase_backup_output_path.You can set the backup path, schedule, how many old backups to keep, file ownership, and more—all through variables.
Dedicated backup user:
Backups now use a dedicated
backupdatabase user with read-only privileges for the target databases (instead ofrootor an application user). This approach is safer, as it avoids using highly privileged accounts for automated operations. Also, thebackupuser is created automatically with the necessary permissions when backups are enabled.You can set the backup user’s password using the
database_backup_user_passwordvariable.Just list the databases you want to back up in the database_backup_dbs variable, for example: