Ignore symlinks with missing target, add better backup logging, update copyright year to 2021

This commit is contained in:
Matthew Penner
2020-12-27 12:54:18 -07:00
parent e75118e0f0
commit 640e30de8a
5 changed files with 43 additions and 14 deletions

View File

@@ -2,6 +2,7 @@ package backup
import (
"errors"
"github.com/apex/log"
"github.com/pterodactyl/wings/server/filesystem"
"os"
)
@@ -47,9 +48,16 @@ func (b *LocalBackup) Generate(basePath, ignore string) (*ArchiveDetails, error)
Ignore: ignore,
}
l := log.WithFields(log.Fields{
"backup_id": b.Uuid,
"adapter": "local",
})
l.Info("attempting to create backup..")
if err := a.Create(b.Path()); err != nil {
return nil, err
}
l.Info("created backup successfully.")
return b.Details(), nil
}