backup: use datetime string as default archive name

Because unix timestamp is not very human readable.
This commit is contained in:
Unknwon
2017-05-29 16:51:30 -04:00
parent 4e87e62d5c
commit 11ad64f6cb

View File

@@ -33,7 +33,7 @@ portable among all supported database engines.`,
boolFlag("verbose, v", "Show process details"),
stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"),
stringFlag("target", "./", "Target directory path to save backup archive"),
stringFlag("archive-name", fmt.Sprintf("gogs-backup-%d.zip", time.Now().Unix()), "Name of backup archive"),
stringFlag("archive-name", fmt.Sprintf("gogs-backup-%s.zip", time.Now().Format("20060102150405")), "Name of backup archive"),
boolFlag("database-only", "Only dump database"),
boolFlag("exclude-repos", "Exclude repositories"),
},