mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 13:39:41 +01:00
chore: update log message
This commit is contained in:
@@ -45,7 +45,7 @@ func scheduledMode(db *dbConfig, config *BackupConfig) {
|
|||||||
//Test database connexion
|
//Test database connexion
|
||||||
testDatabaseConnection(db)
|
testDatabaseConnection(db)
|
||||||
|
|
||||||
utils.Info("Creating cron instance...")
|
utils.Info("Creating backup job...")
|
||||||
// Create a new cron instance
|
// Create a new cron instance
|
||||||
c := cron.New()
|
c := cron.New()
|
||||||
|
|
||||||
@@ -57,12 +57,12 @@ func scheduledMode(db *dbConfig, config *BackupConfig) {
|
|||||||
}
|
}
|
||||||
// Start the cron scheduler
|
// Start the cron scheduler
|
||||||
c.Start()
|
c.Start()
|
||||||
utils.Info("Creating cron instance...done")
|
utils.Info("Creating backup job...done")
|
||||||
|
utils.Info("Backup job started")
|
||||||
defer c.Stop()
|
defer c.Stop()
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
func BackupTask(db *dbConfig, config *BackupConfig) {
|
func BackupTask(db *dbConfig, config *BackupConfig) {
|
||||||
utils.Info("Starting backup task...")
|
|
||||||
//Generate backup file name
|
//Generate backup file name
|
||||||
backupFileName := fmt.Sprintf("%s_%s.sql.gz", db.dbName, time.Now().Format("20240102_150405"))
|
backupFileName := fmt.Sprintf("%s_%s.sql.gz", db.dbName, time.Now().Format("20240102_150405"))
|
||||||
if config.disableCompression {
|
if config.disableCompression {
|
||||||
|
|||||||
Reference in New Issue
Block a user