Script gnt_backup
[hide private]
[frames] | no frames]

Script gnt_backup

Backup related commands

Functions [hide private]
int
PrintExportList(opts, args)
Prints a list of all the exported system images.
int
ExportInstance(opts, args)
Export an instance to an image in the cluster.
 
ImportInstance(opts, args)
Add an instance to the cluster.
int
RemoveExport(opts, args)
Remove an export from the cluster.
Variables [hide private]
  _VALUE_TRUE = "true"
  import_opts = [BACKEND_OPT, DISK_OPT, DISK_TEMPLATE_OPT, FILES...
  commands = {'list':(PrintExportList, ARGS_NONE, [NODE_LIST_OPT...

Imports: sys, opcodes, constants, errors


Function Details [hide private]

PrintExportList(opts, args)

 

Prints a list of all the exported system images.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should be an empty list
Returns: int
the desired exit code

ExportInstance(opts, args)

 

Export an instance to an image in the cluster.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the name of the instance to be exported
Returns: int
the desired exit code

ImportInstance(opts, args)

 

Add an instance to the cluster.

This is just a wrapper over GenericInstanceCreate.

RemoveExport(opts, args)

 

Remove an export from the cluster.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the name of the instance whose backup should be removed
Returns: int
the desired exit code

Variables Details [hide private]

import_opts

Value:
[BACKEND_OPT, DISK_OPT, DISK_TEMPLATE_OPT, FILESTORE_DIR_OPT, FILESTOR\
E_DRIVER_OPT, HYPERVISOR_OPT, IALLOCATOR_OPT, IDENTIFY_DEFAULTS_OPT, N\
ET_OPT, NODE_PLACEMENT_OPT, NOIPCHECK_OPT, NONAMECHECK_OPT, NONICS_OPT\
, NWSYNC_OPT, OSPARAMS_OPT, OS_SIZE_OPT, SRC_DIR_OPT, SRC_NODE_OPT, SU\
BMIT_OPT, DRY_RUN_OPT,]

commands

Value:
{'list':(PrintExportList, ARGS_NONE, [NODE_LIST_OPT], "", "Lists insta\
nce exports available in the ganeti cluster"), 'export':(ExportInstanc\
e, ARGS_ONE_INSTANCE, [FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHU\
TDOWN_TIMEOUT_OPT, REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT, DR\
Y_RUN_OPT], "-n <target_node> [opts...] <name>", "Exports an instance \
to an image"), 'import':(ImportInstance, ARGS_ONE_INSTANCE, import_opt\
s, "[...] -t disk-type -n node[:secondary-node] <name>", "Imports an i\
nstance from an exported image"), 'remove':(RemoveExport, [ArgUnknown(\
...