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:
Michael Mayer
2025-07-03 20:59:54 +02:00
parent 77ac3b545f
commit 73374cb325

View File

@@ -105,6 +105,8 @@ func backupAction(ctx *cli.Context) error {
backupFile := time.Now().UTC().Format("2006-01-02") + ".sql"
fileName = filepath.Join(databasePath, backupFile)
} else {
retain = 0
}
if err = backup.Database(databasePath, fileName, fileName == "-", force, retain); err != nil {