Browse Source

backup: use datetime string as default archive name

Because unix timestamp is not very human readable.
pull/4517/merge
Unknwon 8 years ago
parent
commit
11ad64f6cb
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      cmd/backup.go

2
cmd/backup.go

@ -33,7 +33,7 @@ portable among all supported database engines.`,
boolFlag("verbose, v", "Show process details"), boolFlag("verbose, v", "Show process details"),
stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"), stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"),
stringFlag("target", "./", "Target directory path to save backup archive"), 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("database-only", "Only dump database"),
boolFlag("exclude-repos", "Exclude repositories"), boolFlag("exclude-repos", "Exclude repositories"),
}, },

Loading…
Cancel
Save