Skip to content

Commit

Permalink
chore: add extra migration backup logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Oct 24, 2024
1 parent 70ac096 commit 171402a
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 for migrating 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 for migrating 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 171402a

Please sign in to comment.