February 11, 2009"> 8"> gnt-backup"> Debian"> GNU"> GPL"> ]> 2007 2008 2009 Google Inc. &dhdate; &dhucpackage; &dhsection; ganeti 2.0 &dhpackage; ganeti instance import/export &dhpackage; command arguments... DESCRIPTION The &dhpackage; is used for importing and exporting instances and their configuration from a ganeti system. It is useful for backing instances up and also to migrate them between clusters. COMMANDS EXPORT export -n node --noshutdown instance Exports an instance to the target node. All the instance data and its configuration will be exported under the /srv/ganeti/export/instance directory on the target node. The option will create a snapshot disk of the instance without shutting it down first. While this is faster and involves no downtime, it cannot be guaranteed that the instance data will be in a consistent state in the exported dump. Example: # gnt-backup export -n node1.example.com instance3.example.com IMPORT import -n node:secondary-node --iallocator name --disk N:size=VAL,mode=ro|rw --net N:options --no-nics -B BEPARAMS -H HYPERVISOR:option=value --src-node=source-node --src-dir=source-dir -t diskless plain drbd file instance Imports a new instance from an export residing on source-node in source-dir. instance must be in DNS and resolve to a IP in the same network as the nodes in the cluster. If the source node and directory are not passed, the last backup in the cluster is used, as visible with the list command. The option specifies the parameters for the disks of the instance. The numbering of disks starts at zero, and at least one disk needs to be passed. 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. Alternatively, a single-disk instance can be created via the option which takes a single argument, the size of the disk. This is similar to the Ganeti 1.2 version (but will only create one disk). The minimum disk specification is therefore --disk 0:size=20G (or -s 20G when using the option), and a three-disk instance can be specified as --disk 0:size=20G --disk 1:size=4G --disk 2:size=100G. The NICs of the instances can be specified via the option. By default, one NIC is created for the instance, with the MAC set to the original MAC of the instance (as it was at export time). Each NIC can take up to three parameters (all optional): mac either a value or GENERATE to generate a new unique MAC, or AUTO to reuse the old MAC ip specifies the IP address assigned to the instance from the Ganeti side (this is not necessarily what the instance will use, but what the node expects the instance to use) bridge specifies the bridge to attach this NIC to Alternatively, if no network is desired for the instance, you can prevent the default of one NIC with the option. The option specifies the backend parameters for the instance. If no such parameters are specified, the values are inherited from the cluster. 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 vcpus the number of VCPUs to assign to the instance (if this value makes sense for the hypervisor) auto_balance whether the instance is considered in the N+1 cluster checks (enough redundancy in the cluster to survive a node failure) The options specifies the disk layout type for the instance. The available choices are: diskless This creates an instance with no disks. Its useful for testing only (or other special cases). plain Disk devices will be logical volumes. drbd Disk devices will be drbd (version 8.x) on top of lvm volumes. file Disk devices will be backed up by files, under the @RPL_FILE_STORAGE_DIR@. By default, each instance will get a directory (as its own name) under this path, and each disk is stored as individual files in this (instance-specific) directory. The option specifies the instance allocator plugin to use. If you pass in this option the allocator will select nodes for this instance automatically, so you don't need to pass them with the option. For more information please refer to the instance allocator documentation. The optional second value of the is used for the drbd template and specifies the remote node. If you do not want gnt-backup to wait for the disk mirror to be synced, use the option. Example: # gnt-backup import -t plain --disk 0:size=1G -B memory=512 \ > -n node1.example.com \ > instance3.example.com LIST list --node=NODE 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 option (which can be used multiple times) Example: # gnt-backup list --nodes node1 --nodes node2 REMOVE remove instance_name Removes the backup for the given instance name, if any. If the backup was for a deleted instances, it is needed to pass the FQDN of the instance, and not only the short hostname. &footer;