mirror of
https://github.com/octoleo/restic.git
synced 2024-11-04 12:34:13 +00:00
parent
1f9db97d33
commit
d7f52fd7e5
@ -1,8 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"restic"
|
"restic"
|
||||||
"restic/errors"
|
"restic/errors"
|
||||||
|
"restic/index"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
@ -52,6 +54,19 @@ func runList(opts GlobalOptions, args []string) error {
|
|||||||
t = restic.KeyFile
|
t = restic.KeyFile
|
||||||
case "locks":
|
case "locks":
|
||||||
t = restic.LockFile
|
t = restic.LockFile
|
||||||
|
case "blobs":
|
||||||
|
idx, err := index.Load(repo, nil)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, pack := range idx.Packs {
|
||||||
|
for _, entry := range pack.Entries {
|
||||||
|
fmt.Printf("%v %v\n", entry.Type, entry.ID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
default:
|
default:
|
||||||
return errors.Fatal("invalid type")
|
return errors.Fatal("invalid type")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user