diff --git a/pkg/restic/commands.go b/pkg/restic/commands.go index b2358a14b..66cc5ed96 100644 --- a/pkg/restic/commands.go +++ b/pkg/restic/commands.go @@ -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}) } @@ -373,6 +374,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) diff --git a/pkg/restic/config.go b/pkg/restic/config.go index 6bbf8a01b..5f1303010 100644 --- a/pkg/restic/config.go +++ b/pkg/restic/config.go @@ -89,6 +89,7 @@ type SetupOptions struct { MaxConnections int64 Nice *ofst.NiceSettings IONice *ofst.IONiceSettings + IgnoreInode bool } type MetricsOptions struct {