snapshot: Explicitly export Pathbuilders
This commit updates the 'wdcli snapshot' command to also export pathbuilders from the system.
This commit is contained in:
parent
477152814a
commit
c4de1f2a06
5 changed files with 125 additions and 6 deletions
19
env/snapshot.go
vendored
19
env/snapshot.go
vendored
|
|
@ -86,6 +86,7 @@ type Snapshot struct {
|
|||
ErrStop error
|
||||
|
||||
ErrBookkeep error
|
||||
ErrPathbuilder error
|
||||
ErrFilesystem error
|
||||
ErrTriplestore error
|
||||
ErrSSQL error
|
||||
|
|
@ -145,6 +146,24 @@ func (snapshot *Snapshot) create(io stream.IOStream, instance Instance) {
|
|||
_, snapshot.ErrBookkeep = fmt.Fprintf(info, "%#v\n", instance.Instance)
|
||||
}()
|
||||
|
||||
// write pathbuilders
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
pbPath := filepath.Join(snapshot.Description.Dest, "pathbuilders")
|
||||
messages <- pbPath
|
||||
|
||||
// create the directory!
|
||||
if err := os.Mkdir(pbPath, fs.ModeDir); err != nil {
|
||||
snapshot.ErrPathbuilder = err
|
||||
return
|
||||
}
|
||||
|
||||
// put in all the pathbuilders
|
||||
snapshot.ErrPathbuilder = instance.ExportPathbuilders(pbPath)
|
||||
}()
|
||||
|
||||
// backup the filesystem
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue