mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2026-11-13 08:37:15 +00:00
fix: backup date and time
This commit is contained in:
1 parent
b0224e43ef
commit
73d19913f8
1 file changed
+2
-2
+2
-2
@@ -67,9 +67,9 @@ func scheduledMode(db *dbConfig, config *BackupConfig) {
|
||||
}
|
||||
func BackupTask(db *dbConfig, config *BackupConfig) {
|
||||
//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("20060102_150405"))
|
||||
if config.disableCompression {
|
||||
backupFileName = fmt.Sprintf("%s_%s.sql", db.dbName, time.Now().Format("20240102_150405"))
|
||||
backupFileName = fmt.Sprintf("%s_%s.sql", db.dbName, time.Now().Format("20060102_150405"))
|
||||
}
|
||||
config.backupFileName = backupFileName
|
||||
switch config.storage {
|
||||
|
||||
Reference in new issue
Block a user