mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Backup: Do not delete old dumps when filename is set manually #5088
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -105,6 +105,8 @@ func backupAction(ctx *cli.Context) error {
|
|||||||
|
|
||||||
backupFile := time.Now().UTC().Format("2006-01-02") + ".sql"
|
backupFile := time.Now().UTC().Format("2006-01-02") + ".sql"
|
||||||
fileName = filepath.Join(databasePath, backupFile)
|
fileName = filepath.Join(databasePath, backupFile)
|
||||||
|
} else {
|
||||||
|
retain = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = backup.Database(databasePath, fileName, fileName == "-", force, retain); err != nil {
|
if err = backup.Database(databasePath, fileName, fileName == "-", force, retain); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user