Skip to content

Commit

Permalink
Added support for ignore-inode
Browse files Browse the repository at this point in the history
  • Loading branch information
weisdd committed Dec 21, 2020
1 parent cec1888 commit 079d2ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/restic/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (w *ResticWrapper) backup(params backupParams) ([]byte, error) {
args = w.appendCleanupCacheFlag(args)
args = w.appendCaCertFlag(args)
args = w.appendMaxConnectionsFlag(args)
args = w.appendIgnoreInodeFlag(args)

return w.run(Command{Name: ResticCMD, Args: args})
}
Expand Down Expand Up @@ -369,6 +370,13 @@ func (w *ResticWrapper) appendCaCertFlag(args []interface{}) []interface{} {
return args
}

func (w *ResticWrapper) appendIgnoreInodeFlag(args []interface{}) []interface{} {
if w.config.IgnoreInode {
return append(args, "--ignore-inode")
}
return args
}

func (w *ResticWrapper) run(commands ...Command) ([]byte, error) {
// write std errors into os.Stderr and buffer
errBuff, err := circbuf.NewBuffer(256)
Expand Down
1 change: 1 addition & 0 deletions pkg/restic/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type SetupOptions struct {
MaxConnections int64
Nice *ofst.NiceSettings
IONice *ofst.IONiceSettings
IgnoreInode bool
}

type MetricsOptions struct {
Expand Down

0 comments on commit 079d2ba

Please sign in to comment.