Skip to content

Commit

Permalink
Add auto-dedup flag for checkpoint/restore
Browse files Browse the repository at this point in the history
When doing incremental dumps is useful to use auto deduplication of
memory images to save space.

Signed-off-by: Nikolas Sepos <nikolas.sepos@gmail.com>
  • Loading branch information
thegrumpylion committed Aug 18, 2017
1 parent da4a5a9 commit 3f234b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ checkpointed.`,
cli.BoolFlag{Name: "pre-dump", Usage: "dump container's memory information only, leave the container running after this"},
cli.StringFlag{Name: "manage-cgroups-mode", Value: "", Usage: "cgroups mode: 'soft' (default), 'full' and 'strict'"},
cli.StringSliceFlag{Name: "empty-ns", Usage: "create a namespace, but don't restore its properties"},
cli.BoolFlag{Name: "auto-dedup", Usage: "enable auto deduplication of memory images"},
},
Action: func(context *cli.Context) error {
if err := checkArgs(context, 1, exactArgs); err != nil {
Expand Down
5 changes: 5 additions & 0 deletions restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ using the runc checkpoint command.`,
Name: "empty-ns",
Usage: "create a namespace, but don't restore its properties",
},
cli.BoolFlag{
Name: "auto-dedup",
Usage: "enable auto deduplication of memory images",
},
},
Action: func(context *cli.Context) error {
if err := checkArgs(context, 1, exactArgs); err != nil {
Expand Down Expand Up @@ -123,5 +127,6 @@ func criuOptions(context *cli.Context) *libcontainer.CriuOpts {
ShellJob: context.Bool("shell-job"),
FileLocks: context.Bool("file-locks"),
PreDump: context.Bool("pre-dump"),
AutoDedup: context.Bool("auto-dedup"),
}
}

0 comments on commit 3f234b1

Please sign in to comment.