fix(backup): restore over network share EE-6578 (#11044)

This commit is contained in:
Dakota Walsh
2024-02-01 11:41:32 +13:00
committed by GitHub
parent a618ee78e4
commit 5ee6efb145
8 changed files with 35 additions and 25 deletions

View File

@@ -40,7 +40,7 @@ func (store *Store) MigrateData() error {
}
// before we alter anything in the DB, create a backup
_, err = store.Backup()
_, err = store.Backup("")
if err != nil {
return errors.Wrap(err, "while backing up database")
}
@@ -131,7 +131,6 @@ func (store *Store) FailSafeMigrate(migrator *migrator.Migrator, version *models
// Rollback to a pre-upgrade backup copy/snapshot of portainer.db
func (store *Store) connectionRollback(force bool) error {
if !force {
confirmed, err := cli.Confirm("Are you sure you want to rollback your database to the previous backup?")
if err != nil || !confirmed {