diff --git a/pkg/restic/commands.go b/pkg/restic/commands.go index 76c1ee3e1..17c2b56bb 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}) } @@ -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) diff --git a/pkg/restic/config.go b/pkg/restic/config.go index 197809328..0fe93e394 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 {