Skip to content

Commit

Permalink
Merge pull request #89 from jkaninda/refactor
Browse files Browse the repository at this point in the history
fix: backup date and time
  • Loading branch information
jkaninda authored Sep 29, 2024
2 parents 2d2e526 + d3fc8fc commit 1b5c8df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ func scheduledMode(db *dbConfig, config *BackupConfig) {
func BackupTask(db *dbConfig, config *BackupConfig) {
utils.Info("Starting backup task...")
//Generate 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 {
Expand Down

0 comments on commit 1b5c8df

Please sign in to comment.