Send restoration status information to the console

This commit is contained in:
Dane Everitt
2021-01-30 18:49:07 -08:00
parent adc0732af3
commit 4bd18f7dd8
2 changed files with 8 additions and 3 deletions

View File

@@ -151,6 +151,7 @@ func (s *Server) RestoreBackup(b backup.BackupInterface, reader io.ReadCloser) (
// in the file one at a time and writing them to the disk.
s.Log().Debug("starting file writing process for backup restoration")
err = b.Restore(reader, func(file string, r io.Reader) error {
s.Events().Publish(DaemonMessageEvent, "(restoring): "+file)
return s.Filesystem().Writefile(file, r)
})