Backing up your current cluster

Next, back up your current cluster.

If you're upgrading from 1.1.0 or 1.1.1, run the backup script added by the hotfix. If you're upgrading from 1.1.3 or higher, use bdd-admin's backup command. All versions of the script back up the following data to a single TAR file, which you can use to restore your current cluster if the upgrade fails.
  • Configuration files
  • Studio database
  • Schema and data for Hive tables created in Studio
  • Dgraph databases (index)
  • Sample files in HDFS
Before you run the backup script, verify the following:
  • The BDD_STUDIO_JDBC_USERNAME and BDD_STUDIO_JDBC_PASSWORD environment variables are set. If they aren't, the script will prompt you for the username and password of the Studio database at runtime.
  • The database client is installed on the Admin Server. For MySQL databases, this should be MySQL client. For Oracle databases, this should be Oracle Database Client, which must be installed with a type of Administrator. Note that the Instant Client isn't supported.
  • If you have an Oracle database, the ORACLE_HOME environment variable is set to the parent directory of the /bin directory the sqlplus executable is located in. For example, if the sqlplus executable is located in /u01/app/oracle/product/11/2/0/dbhome/bin, set ORACLE_HOME to /u01/app/oracle/product/11/2/0/dbhome.
Additionally, make sure the temporary directories used during the backup operation contain enough free space. These requirements only need to be met for the duration of the backup operation.
  • If you have 1.1.x, both the destination of the backup TAR file and the location defined by TEMP_FOLDER_PATH in bdd.conf must contain enough space to store the Dgraph databases, $HDFS_DP_USER_DIR, and the edpDataDir (defined in edp.properties) at the same time.
  • If you have 1.2.x or later:
    • The destination of the backup TAR file must contain enough space to store the Dgraph databases, $HDFS_DP_USER_DIR, and the edpDataDir (defined in edp.properties) at the same time.
    • The location on the Admin Server defined by BACKUP_LOCAL_TEMP_FOLDER_PATH in bdd.conf also requires enough space to store all three items simultaneously.
    • The location in HDFS defined by BACKUP_HDFS_TEMP_FOLDER_PATH in bdd.conf must contain enough free space to accommodate the largest of these items, as it will only store them one at a time.

To back up your current cluster:

  1. On the Admin Server, open a command prompt and go to $BDD_HOME/BDD_manager/bin.
  2. Stop your cluster :
    ./bdd-admin.sh stop [-t <minutes>]
  3. Run the backup script.
    • BDD 1.1.0 and 1.1.1:
      ./bdd-backup.sh -o -v <backup_tar_file>
    • All other versions:
      ./bdd-admin.sh backup -o -v <backup_tar_file>
    Where <backup_tar_file> is the absolute path to the backup TAR file. This file must not exist and its parent directory must be writable.
  4. Enter the username and password for the Studio database, if prompted.

The script backs up your current cluster to the specified TAR file.