Back up a Database Cluster

This page walks you through the steps to back up your database cluster. The process also applies to single-server instances.

Backing up a cluster is an online operation. Your database remains available during the backup.

Consult the gadmin Command Glossary to view the help files for the gadmin backup commands.

1. Prerequisites

  • You have access to the TigerGraph Linux user account on your cluster. All commands must be run from the TigerGraph Linux user.

  • You have provided valid configurations for database backup.

2. Procedure

2.1. Data backup

To back up a database cluster, run the following command:

$ gadmin backup create <tag>

Replace <tag> with a custom tag for the backup. A timestamp is suffixed to the tag you provided to form the full tag of the backup. If no tag is provided, the system uses the default backup followed by the timestamp when the backup is created as the tag for the backup.

For example, run the following command to create a backup for a database cluster:

$ gadmin backup create weekly

This creates a backup named weekly-<timestamp> at the backup location you configured.

You can also make weekly the entire tag by using the flag --custom-tag:

$ gadmin backup create weekly --custom-tag

This creates a backup named weekly without the -<timestamp> suffix.

2.2. Metadata backup (Optional)

Since v3.9.2, it is no longer required to create a backup for a backup’s metadata. A backup’s metadata is now stored as a part of a backup’s files and will be searched for with the backup’s position.
If you are using a version previous to v3.9.2, please refer to the instructions below.

This step is only necessary if you are planning for an event where you need to restore the backup in another cluster.

Run the following command to create a backup for the metadata of a particular backup:

$ gadmin backup list <backup_tag> --meta

This produces a file called metadata in the current path where the command is run. Store this file in a secure location. This file is required to restore the backup in another database cluster.