3
0
mirror of https://kolaente.dev/konrad/docker-db-backup.git synced 2026-01-09 12:40:07 +01:00

feat: change the backup date format to make sure the backups sort properly

This commit is contained in:
kolaente
2022-01-08 12:33:50 +01:00
parent 1e05d4966b
commit 064d2ce66e

View File

@@ -65,7 +65,7 @@ func init() {
func updateFullBackupPath() {
dumpTime = time.Now()
config.fullCurrentBackupPath = config.Folder + dumpTime.Format("02-01-2006_15-04-05") + "/"
config.fullCurrentBackupPath = config.Folder + dumpTime.Format("2006-01-02_15-04-05") + "/"
err := os.MkdirAll(config.fullCurrentBackupPath, 0744)
if err != nil {
log.Fatalf("Could not create backup folder: %s\n", err)