Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for restic --ignore-inode #75

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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)
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