Backing Up and Restoring Online Disk Stores

When you invoke the sqlf backup command, SQLFire backs up disk stores for all members that are running in the distributed system at that time. Each member with persistent data creates a backup of its own configuration and disk stores.


Backup Guidelines and Prerequisites


Back Up an Online Disk Store


  1. Run the backup command, providing your backup directory location. Example:
    sqlf backup /export/fileServerDirectory/gemfireBackupLocation
         -locators=warsaw.vmware.com[26340]
  2. Read the message that reports on the success of the operation.

    If the operation is successful, you see a message like this:

    Connecting to distributed system: locators=warsaw.vmware.com[26340]
    The following disk stores were backed up:
    	DiskStore at hosta.vmware.com /home/dsmith/dir1
    	DiskStore at hostb.vmware.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.vmware.com[26357]
    The following disk stores were backed up:
    	DiskStore at hosta.vmware.com /home/dsmith/dir1
    	DiskStore at hostb.vmware.com /home/dsmith/dir2
    The backup may be incomplete. The following disk stores are not online:
    	DiskStore at hostc.vmware.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. Offline members leave nothing, so you only have this message from the backup operation itself. Although offline members cannot back up their disk stores, a complete backup can be obtained if at least one copy of the data is available in a running member.

What the Online Backup Saves

For each member with persistent data, the backup includes:
  • Disk store files for all stores containing persistent tables.
  • Configuration files from the member startup (sqlfire.properties). These configuration files are not automatically restored, to avoid interfering with any more recent configurations. In particular, if these are extracted from a master jar file, copying the separate files into your working area could override the files in the jar.
  • A restore script, written for the member’s operating system, that copies the files back to their original locations. For example, in Windows, the file is restore.bat and in Linux, it is restore.sh.

Restore an Online Backup

The restore script included in the online backup copies files back to their original locations. You can do this manually if you wish.

Prerequisites

Your members are offline and the system is down.

Procedure
  1. Read the restore scripts to see where they will place the files and make sure the destination locations are ready. The restore scripts refuse to copy over files with the same names.
  2. Run each restore script on the host where the backup originated.

    In Windows, the file is restore.bat and in Linux, it is restore.sh.

    The restore copies the files back to their original location.