Commit 0a6e6e6d authored by Thomas Thrainer's avatar Thomas Thrainer

Add --compress option to gnt-backup export

Add a new command line parameter to gnt-backup export and pass its value
to OpBackupExport. Also document the option in the man page.
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 51d7ac96
......@@ -92,6 +92,7 @@ def ExportInstance(opts, args):
op = opcodes.OpBackupExport(instance_name=args[0],
target_node=opts.node,
compress=opts.compress,
shutdown=opts.shutdown,
shutdown_timeout=opts.shutdown_timeout,
remove_instance=opts.remove_instance,
......@@ -148,9 +149,9 @@ commands = {
"Lists all available fields for exports"),
"export": (
ExportInstance, ARGS_ONE_INSTANCE,
[FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT,
REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT, DRY_RUN_OPT,
PRIORITY_OPT] + SUBMIT_OPTS,
[FORCE_OPT, SINGLE_NODE_OPT, COMPRESS_OPT, NOSHUTDOWN_OPT,
SHUTDOWN_TIMEOUT_OPT, REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT,
DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS,
"-n <target_node> [opts...] <name>",
"Exports an instance to an image"),
"import": (
......
......@@ -24,15 +24,19 @@ COMMANDS
EXPORT
~~~~~~
| **export** {-n *node*} [\--shutdown-timeout=*N*] [\--noshutdown]
| [\--remove-instance] [\--ignore-remove-failures] [\--submit]
| [\--print-job-id]
| **export** {-n *node*} [\--compress=*compression-mode*]
| [\--shutdown-timeout=*N*] [\--noshutdown] [\--remove-instance]
| [\--ignore-remove-failures] [\--submit] [\--print-job-id]
| {*instance*}
Exports an instance to the target node. All the instance data and
its configuration will be exported under the
``@CUSTOM_EXPORT_DIR@/$instance`` directory on the target node.
The ``--compress`` option is used to specify which compression mode
is used during the export. Valid values are 'none' (the default) and
'gzip'.
The ``--shutdown-timeout`` is used to specify how much time to wait
before forcing the shutdown (xm destroy in xen, killing the kvm
process, for kvm). By default two minutes are given to each
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment