1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul synced 2024-09-18 01:50:50 +00:00

Change backup format to a sane one

This commit is contained in:
Ash Keel 2022-01-22 11:08:00 +01:00
parent b078f6d8c0
commit e67cce8c82
No known key found for this signature in database
GPG key ID: BAD8D93E7314ED3E

View file

@ -230,7 +230,7 @@ func main() {
defer ticker.Stop()
for range ticker.C {
// Run backup procedure
file, err := os.Create(fmt.Sprintf("%s/%d.db", *backupDir, time.Now().Unix()))
file, err := os.Create(fmt.Sprintf("%s/%s.db", *backupDir, time.Now().Format("20060102-150405")))
if err != nil {
log.WithError(err).Error("Could not create backup file")
continue