mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -84,6 +84,9 @@ func restoreAction(ctx *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
conf.RegisterDb()
|
||||
defer conf.Shutdown()
|
||||
|
||||
if restoreIndex {
|
||||
// If empty, use default backup file name.
|
||||
if indexFileName == "" {
|
||||
@@ -132,7 +135,6 @@ func restoreAction(ctx *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
entity.SetDbProvider(conf)
|
||||
tables := entity.Entities
|
||||
|
||||
var cmd *exec.Cmd
|
||||
@@ -219,7 +221,5 @@ func restoreAction(ctx *cli.Context) error {
|
||||
|
||||
log.Infof("restored in %s", elapsed)
|
||||
|
||||
conf.Shutdown()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user