3342da13c6
customizable retention and logging Refactor backup method to dump each database individually Update delete_old_backups method to remove local backups based on user-defined retention days Add Loggman class for logging program actions to a logfile and implement log deletion for logs older than a week Modify MysqlDatabaseConfig class to ask the user for local and B2 backup retention days Update MysqlDatabaseBackup class to use user-defined retention days for local backups Refactor upload_to_b2 method to delete B2 backups based on user-defined retention days Implement various code improvements and refactoring for better readability and maintainability
13 lines
286 B
Ruby
13 lines
286 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative 'mysql_database_config'
|
|
require_relative 'mysql_database_backup'
|
|
|
|
config_file = 'config.json'
|
|
|
|
config_generator = MysqlDatabaseConfig.new(config_file)
|
|
config_generator.generate
|
|
|
|
backup = MysqlDatabaseBackup.new(config_file)
|
|
backup.backup
|