X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/56956bcb88b05f50e15b928d9e4fe7af6ee8576f..8e4230a8edd6f78480e116aa6257640400951221:/man/gnt-backup.rst diff --git a/man/gnt-backup.rst b/man/gnt-backup.rst index 9c8900c..a17dc51 100644 --- a/man/gnt-backup.rst +++ b/man/gnt-backup.rst @@ -24,12 +24,14 @@ COMMANDS EXPORT ~~~~~~ -**export** {-n *node*} [--shutdown-timeout=*N*] [--noshutdown] -[--remove-instance] [--ignore-remove-failures] {*instance*} +| **export** {-n *node*} [\--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. +``@CUSTOM_EXPORT_DIR@/$instance`` directory on the target node. The ``--shutdown-timeout`` is used to specify how much time to wait before forcing the shutdown (xm destroy in xen, killing the kvm @@ -53,6 +55,9 @@ execution (and will be stored in the job log). It is recommended that for any non-zero exit code, the backup is considered invalid, and retried. +See **ganeti**\(7) for a description of ``--submit`` and other common +options. + Example:: # gnt-backup export -n node1.example.com instance3.example.com @@ -62,14 +67,16 @@ IMPORT ~~~~~~ | **import** -| {-n *node[:secondary-node]* | --iallocator *name*} -| [--disk *N*:size=*VAL* [,mode=*ro|rw*]...] -| [--net *N* [:options...] | --no-nics] +| {-n *node[:secondary-node]* | \--iallocator *name*} +| [\--disk *N*:size=*VAL* [,vg=*VG*], [,mode=*ro|rw*]...] +| [\--net *N* [:options...] | \--no-nics] | [-B *BEPARAMS*] | [-H *HYPERVISOR* [: option=*value*... ]] -| [--src-node=*source-node*] [--src-dir=*source-dir*] +| [\--src-node=*source-node*] [\--src-dir=*source-dir*] | [-t [diskless | plain | drbd | file]] -| [--identify-defaults] +| [\--identify-defaults] +| [\--ignore-ipolicy] +| [\--submit] [\--print-job-id] | {*instance*} Imports a new instance from an export residing on *source-node* in @@ -81,11 +88,11 @@ as visible with the **list** command. The ``disk`` option specifies the parameters for the disks of the instance. The numbering of disks starts at zero. For each disk, at least the size needs to be given, and optionally the access mode -(read-only or the default of read-write) can also be specified. The -size is interpreted (when no unit is given) in mebibytes. You can -also use one of the suffixes m, g or t to specificy the exact the -units used; these suffixes map to mebibytes, gibibytes and -tebibytes. +(read-only or the default of read-write) and LVM volume group can also +be specified. The size is interpreted (when no unit is given) in +mebibytes. You can also use one of the suffixes m, g or t to specificy +the exact the units used; these suffixes map to mebibytes, gibibytes +and tebibytes. Alternatively, a single-disk instance can be created via the ``-s`` option which takes a single argument, the size of the disk. This is @@ -115,30 +122,34 @@ ip the node expects the instance to use) mode - specifies the connection mode for this nic: ``routed`` or - ``bridged``. + specifies the connection mode for this NIC: ``routed``, + ``bridged`` or ``openvswitch`` link - in bridged mode specifies the bridge to attach this NIC to, in - routed mode it's intended to differentiate between different - routing tables/instance groups (but the meaning is dependent on - the network script in use, see **gnt-cluster**(8) for more - details) + in bridged and openvswitch mode specifies the interface to attach + this NIC to, in routed mode it's intended to differentiate between + different routing tables/instance groups (but the meaning is + dependent on the network script in use, see **gnt-cluster**\(8) for + more details) -Of these ``mode`` and ``link`` are nic parameters, and inherit their +Of these ``mode`` and ``link`` are NIC parameters, and inherit their default at cluster level. If no network is desired for the instance, you should create a single -empty NIC and delete it afterwards via **gnt-instance modify --net +empty NIC and delete it afterwards via **gnt-instance modify \--net delete**. The ``-B`` option specifies the backend parameters for the instance. If no such parameters are specified, the values are inherited from the export. Possible parameters are: -memory - the memory size of the instance; as usual, suffixes can be used to - denote the unit, otherwise the value is taken in mebibites +maxmem + the maximum memory size of the instance; as usual, suffixes can be + used to denote the unit, otherwise the value is taken in mebibytes + +minmem + the minimum memory size of the instance; as usual, suffixes can be + used to denote the unit, otherwise the value is taken in mebibytes vcpus the number of VCPUs to assign to the instance (if this value makes @@ -148,6 +159,11 @@ auto_balance whether the instance is considered in the N+1 cluster checks (enough redundancy in the cluster to survive a node failure) +always\_failover + ``True`` or ``False``, whether the instance must be failed over + (shut down and rebooted) always or it may be migrated (briefly + suspended) + The ``-t`` options specifies the disk layout type for the instance. If not passed, the configuration of the original instance is used. @@ -179,6 +195,12 @@ instance allocator documentation. The optional second value of the ``--node`` is used for the drbd template and specifies the remote node. +The ``--src-dir`` option allows importing instances from a directory +below ``@CUSTOM_EXPORT_DIR@``. + +If ``--ignore-ipolicy`` is given any instance policy violations occuring +during this operation are ignored. + Since many of the parameters are by default read from the exported instance information and used as such, the new instance will have all parameters explicitly specified, the opposite of a newly added @@ -189,6 +211,9 @@ value matches the current cluster default and mark it as such affect the hypervisor, backend and NIC parameters, both read from the export file and passed in via the command line. +See **ganeti**\(7) for a description of ``--submit`` and other common +options. + Example for identical instance import:: # gnt-backup import -n node1.example.com instance3.example.com @@ -204,16 +229,40 @@ Explicit configuration example:: LIST ~~~~ -**list** [--node=*NODE*] +| **list** [\--node=*NODE*] [\--no-headers] [\--separator=*SEPARATOR*] +| [-o *[+]FIELD,...*] Lists the exports currently available in the default directory in all the nodes of the current cluster, or optionally only a subset of them specified using the ``--node`` option (which can be used multiple times) +The ``--no-headers`` option will skip the initial header line. The +``--separator`` option takes an argument which denotes what will be +used between the output fields. Both these options are to help +scripting. + +The ``-o`` option takes a comma-separated list of output fields. +The available fields and their meaning are: + +@QUERY_FIELDS_EXPORT@ + +If the value of the option starts with the character ``+``, the new +fields will be added to the default list. This allows one to quickly +see the default list plus a few other fields, instead of retyping +the entire list of fields. + Example:: - # gnt-backup list --nodes node1 --nodes node2 + # gnt-backup list --node node1 --node node2 + + +LIST-FIELDS +~~~~~~~~~~~ + +**list-fields** [field...] + +Lists available fields for exports. REMOVE @@ -224,3 +273,9 @@ REMOVE Removes the backup for the given instance name, if any. If the backup was for a deleted instance, it is needed to pass the FQDN of the instance, and not only the short hostname. + +.. vim: set textwidth=72 : +.. Local Variables: +.. mode: rst +.. fill-column: 72 +.. End: