dump dxgrid-db Command -- Take a Consistent Snapshot Copy of a Datastore

The dump dxgrid-db command takes a consistent snapshot copy of the datastore of a running DSA (an online dump). The file that is written represents the contents of the datastore when the dump started. Updates may proceed while the dump is in progress but they will not appear in the dump file.
cad141
The
dump dxgrid-db
command takes a consistent snapshot copy of the datastore of a running DSA (an online dump). The file that is written represents the contents of the datastore when the dump started. Updates may proceed while the dump is in progress but they will not appear in the dump file.
The datastore file is copied to a file with the extension .zdb.
Each dump overwrites the previous backup file. Create a cron job on UNIX or a scheduled task on Windows to copy the backed up file to a safe location before the next dump.
The DXdumpdb tool can export data from a datastore created by the dump command.
The command has the following format:
dump dxgrid-db [period start period];
  • period
    start
    period
    (Optional) Specifies that the online dump is performed at regular intervals.
    • start
      Defines the number of seconds from Sunday 00:00:00 a.m. GMT.
      The start time is defined using GMT and not your local time.
    • period
      Defines the number of seconds between online dumps.
    The start time is relative to the period and should be lower than it. If you specify a start time that is greater than the period, the actual start is
    start
    -
    period
    . For example, if the
    period
    is 3600 seconds (one hour) and
    start
    is 3610 seconds, the online dump starts 10 seconds from midnight GMT and continues every hour from then on.
Ways to Perform Online Dump for DXgrid
An online dump of a DXgrid database can be performed in the following ways:
  • Interactively
  • Scheduled
For Interactive dump, follow these steps
:
  1. Open a command shell and type "telnet localhost {dsaConsolePort}"
  2. When connected, enter "dump dxgrid-db" command.
The following is displayed:
Welcome to the DSA Management Console
dsa> dump dxgrid-db;  
Starting dump  
Dump started  
dsa>
For Scheduled dump, follow these steps:
  1. Navigate to the dsa's
    settings
    configuration
    file.
  2. Add the following command:
    dump dxgrig-db period <start> <period>;
  3. Save and close the file.
  4. Stop and restart the dsa for changes to take effect.
Once the dump (interactive or scheduled) has completed, you will see a notification in the DSA's warning log about the completion of the dump.
Examples of Scheduled Dump
Example: Perform an Online Dump Every Hour
The following command takes a snapshot copy of the datastore every hour:
dump dxgrid-db period 0 3600;
Example: Perform an Online Dump Every Night
The following command takes a snapshot copy of the datastore every night at 3 a.m. in a GMT+10:00 time zone:
dump dxgrid-db period 61200 86400;
In this example, the start time is the number of seconds from Sunday midnight GMT to the first 3 a.m. slot, corrected by the time zone value, as follows:
(3 am - 10 time zone + 24 hours) * 60 minutes * 60 seconds = 61,200
The 24 hour period is calculated as follows:
24 hours * 60 minutes * 60 seconds = 86,400
Online Dump Errors
The following table describes the errors encountered while performing an online dump and how to resolve these errors:
Warning
Resolution
DXgrid dump request received while dumping
A dump is currently running. Please wait for the dump to complete before issuing the command, or just use the output from the dump that is in process.
Cannot create output file
Ensure that the configured
set dxgrid-backup-location
is writeable by the user the DXserver process is running as. This valus is generally "dsa" for Unix and LocalService on Windows. If a backup location is not configured, the location configured in the
set dxgrid-db-location
command is used.
Cannot write dump file - disk full?
The .zdb dump file could not be created as there is not enough disk space. Ensure that there is at least current .db file of space left on the device (that is configured with set dxgrid-db-size) where the backup will be written.
Cannot seek dump file
Rare: A file system error occurred when accessing the attribute section of the existing .db file. Retry the operation and if it continues to fail, contact your system administrator.