Skip to content

Commit

Permalink
chore: add extra migration backup logs (#757)
Browse files Browse the repository at this point in the history
* chore: add extra migration backup logs

* chore: minor copy
  • Loading branch information
rolznz authored Oct 25, 2024
1 parent 11f0820 commit 373965a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
)

func (api *api) CreateBackup(unlockPassword string, w io.Writer) error {
logger.Logger.Info("Creating backup to migrate Alby Hub to another device")
var err error

if !api.cfg.CheckUnlockPassword(unlockPassword) {
Expand Down Expand Up @@ -130,10 +131,14 @@ func (api *api) CreateBackup(unlockPassword string, w io.Writer) error {
}
}

logger.Logger.Info("Successfully created backup to migrate Alby Hub to another device")

return nil
}

func (api *api) RestoreBackup(unlockPassword string, r io.Reader) error {
logger.Logger.Info("Restoring migration backup file")

workDir, err := filepath.Abs(api.cfg.GetEnv().Workdir)
if err != nil {
return fmt.Errorf("failed to get absolute workdir: %w", err)
Expand Down

0 comments on commit 373965a

Please sign in to comment.