|GemFire XD Reference / gfxd Launcher Commands|
Creates a backup of operational disk stores for all members running in the distributed system. Each member with persistent data creates a backup of its own configuration and disk stores.
Use the mcast-port and -mcast-address, or the -locators options, on the command line to connect to the GemFire XD cluster.
gfxd backup [-baseline=<baseline directory>] <target directory> [-J-D<vmprop>=<prop-value>] [-mcast-port=<port>] [-mcast-address=<address>] [-locators=<addresses>] [-bind-address=<address>] [-<prop-name>=<prop-value>]*
Alternatively, you can specify these and other distributed system properties in a gemfirexd.properties file that is available in the directory where you run the gfxd command.
The table describes options for gfxd backup.
|-baseline||The directory that contains a baseline backup used for comparison during an
incremental backup. The baseline directory corresponds to the date
when the original backup command was performed, rather than the
backup location you specified (for example, a valid baseline
directory might resemble
An incremental backup operation backs up any data that is not already present in the specified -baseline directory. If the member cannot find previously backed up data or if the previously backed up data is corrupt, then command performs a full backup on that member. (The command also performs a full backup if you omit the -baseline option.
|<target-directory>||The directory in which GemFire XD stores the backup content. See Specifying the Backup Directory.|
|-mcast-port|| Multicast port used to communicate with
other members of the distributed system. If zero, multicast is not used for
member discovery (specify
Valid values are in the range 0–65535, with a default value of 10334.
|-mcast-address|| Multicast address used to discover other
members of the distributed system. This value is used only if the
-locators option is not specified.
The default multicast address is 184.108.40.206.
|-locators||List of locators used to discover members of the distributed system. Supply all locators as comma-separated host:port values.|
|-bind-address||The address to which this peer binds for receiving peer-to-peer messages. By default gfxd uses the hostname, or localhost if the hostname points to a local loopback address.|
|-prop-name||Any other GemFire XD distributed system property.|
An online backup saves the following:
gfxd backup ./gfxdBackupLocation -locators=warsaw.pivotal.com
See also Backing Up and Restoring Disk Stores.
gfxd backup -baseline=./gfxdBackupLocation/2012-10-01-12-30 ./gfxdBackupLocation -locators=warsaw.pivotal.com
When you run gfxd backup, it reports on the outcome of the operation.
The backup may be incomplete. The following disk stores are not online: DiskStore at hostc.pivotal.com /home/dsmith/dir3A complete backup can still be performed if all table data is available in the running members.
The tool reports on the success of the operation. If the operation is successful, you see a message like this:
Connecting to distributed system: locators=warsaw.pivotal.com26340 The following disk stores were backed up: DiskStore at hosta.pivotal.com /home/dsmith/dir1 DiskStore at hostb.pivotal.com /home/dsmith/dir2 Backup successful.
If the operation does not succeed at backing up all known members, you see a message like this:
Connecting to distributed system: locators=warsaw.pivotal.com26357 The following disk stores were backed up: DiskStore at hosta.pivotal.com /home/dsmith/dir1 DiskStore at hostb.pivotal.com /home/dsmith/dir2 The backup may be incomplete. The following disk stores are not online: DiskStore at hostc.pivotal.com /home/dsmith/dir3
A member that fails to complete its backup is noted in this ending status message and leaves the file INCOMPLETE_BACKUP in its highest level backup directory.
Below is the structure of files and directories backed up in a distributed system:
2011-05-02-18-10 /: pc15_8933_v10_10761_54522 2011-05-02-18-10/pc15_8933_v10_10761_54522: config diskstores README.txt restore.sh 2011-05-02-18-10/pc15_8933_v10_10761_54522/config: gemfirexd.properties 2011-05-02-18-10/pc15_8933_v10_10761_54522/diskstores: GFXD_DD_DISKSTORE 2011-05-02-18-10/pc15_8933_v10_10761_54522/diskstores/GFXD_DD_DISKSTORE: dir0 2011-05-02-18-10/pc15_8933_v10_10761_54522/diskstores/GFXD_DD_DISKSTORE/dir0: BACKUPGFXD-DD-DISKSTORE_1.crf BACKUPGFXD-DD-DISKSTORE_1.drf BACKUPGFXD-DD-DISKSTORE_2.crf BACKUPGFXD-DD-DISKSTORE_2.drf BACKUPGFXD-DD-DISKSTORE.if
The restore script (restore.sh or restore.bat) copies files back to their original locations. You can do this manually if you wish:
The restore copies these back to their original location.