Backing Up the ArcSight Database

The $dbadmin user must perform the backup.

 

Understanding Available Options

The following options are available for the backup configuration file:

 

Backing Up the Database

  1. Log in to cluster node1 as root.

  2. Generate a backup configuration file.

    The configuration file is required for all future backup and restore operations.

    For each node, you must specify the backup host. The host can be either the local computer or a remote host.

    For each backup host, you must specify the directory where you want to store the backup. Following is an example configuration:

    su -l $dbadmin
    /opt/vertica/bin/vbr --setupconfig
    Number of restore points: 52
    Specify objects:
    Object restore mode (coexist, createOrReplace or create): createOrReplace
    Vertica user name: $dbadmin
    Save password to avoid runtime prompt? [y/n]: n
    Node v_investigate_node0001
    Backup host name: <Backup_Host_1_IP>
    Backup directory: /opt/vertica/backup1
    Node v_investigate_node0002
    Backup host name: <Backup_Host_2_IP>
    Backup directory: /opt/vertica/backup2
    Node v_investigate_node0003
    Backup host name: <Backup_Host_3_IP>
    Backup directory: /opt/vertica/backup3
    Change advanced settings? [y/n]: n
    Config file name: db_backup.ini
    Saved vbr config to db_backup.ini.
    The db_backup.ini file is created in /home/$dbadmin.
    cat ./db_backup.ini
    [Misc]
    snapshotName = vertica_backup
    restorePointLimit = 52
    objectRestoreMode = createOrReplace
    [Database]
    dbName = fusiondb
    dbUser = analyst
    dbPromptForPassword = True
    [Transmission]
    [Mapping]
    v_investigate_node0001 = <Backup_Host_1_IP>:/opt/vertica/backup1
    v_investigate_node0002 = <Backup_Host_2_IP>:/opt/vertica/backup2
    v_investigate_node0003 = <Backup_Host_3_IP>:/opt/vertica/backup3
  3. Initialize the backup locations:

    /opt/vertica/bin/vbr --task init --config-file db_backup.ini          
  4. To ensure you do not lose events during the backup, stop the Kafka scheduler:

    exit
    cd /root/install-vertica
    ./kafka_scheduler stop
  5. To stop the database for backup, run the following command:

    ./db_installer stop-db
  6. To stop the database watchdog service, run the following command:

    crontab -l | sed '/^[^#].*scripts.watchdog/s/^/#/' | crontab -
  7. To back up data, run the following command:
  8. su -l $dbadmin
    /opt/vertica/bin/vbr --task backup --config-file db_backup.ini
    Starting backup of database Recon.
    Participating nodes: v_investigate_node0001.
    Enter vertica password:
    Snapshotting database.
    Snapshot complete.
    Approximate bytes to copy: 270383427 of 270383427 total.
    [==================================================] 100%
    Copying backup metadata.
    Finalizing backup.
    Backup complete!
  9. To start database after backup, run the following command:

    ./db_installer start-db
  10. To start the database watchdog service, run the following command:

    crontab -l | sed '/^[^#].*scripts.watchdog/s/^/#/' | crontab -
  11. Verify the backup files were written to the backup location by running the following command:

    ssh [BACKUP HOST 1 IP] ls /opt/vertica/backup1
    backup_manifest
    Objects
    Snapshots
    ssh [BACKUP HOST 2 IP] ls /opt/vertica/backup2
    backup_manifest
    Objects
    Snapshots
    ssh [BACKUP HOST 3 IP] ls /opt/vertica/backup3
    backup_manifest
    Objects
    Snapshots

 

Backing Up the Database Incrementally

Incremental backups use the same setup as a full backup and only back up what changed from the previous full backup. When you perform a full backup using the same configuration file, subsequent backups are incremental.

When you start an incremental backup, the vbr tool displays a backup size that is a portion of the total backup size. This portion represents the delta changes that will be backed up during the incremental backup.

Run the following command to perform an incremental backup:

/opt/vertica/bin/vbr --task backup --config-file db_backup.ini

 

Verifying the Integrity of the Backup

Use the full-check option to verify the integrity of the Database backup.

The option reports the following:

To verify the backup integrity, run the following command:

# /opt/vertica/bin/vbr --task full-check --config-file db_backup.ini

The output is similar to the following:

Checking backup consistency.
List all snapshots in backup location:
Snapshot name and restore point: backup_snapshot_20180116_172347, nodes:['v_investigate_node0001'].
Snapshot name and restore point: backup_snapshot_20180116_172253, nodes:['v_investigate_node0001'].
Snapshot name and restore point: backup_snapshot_20180116_172236, nodes:['v_investigate_node0001'].
Snapshot name and restore point: backup_snapshot_20180116_172310, nodes:['v_investigate_node0001'].
Snapshot name and restore point: backup_snapshot_20180116_172158, nodes:['v_investigate_node0001'].
Snapshots that have missing objects(hint: use 'vbr --task remove' to delete these snapshots):
Backup locations have 0 unreferenced objects
Backup locations have 0 missing objects
Backup consistency check complete.