Previous Topic: Data Repository Backup ConsiderationsNext Topic: Configure a Data Repository Backup to the Same Host (Single-Node and Cluster Installations)


Configure a Data Repository Backup to a Remote Host (Single-Node and Cluster Installations)

You can back up Data Repository to a remote host.

We recommend that each Data Repository node have its own remote host for backups. For example, for a cluster environment with three Data Repository nodes, each Data Repository host requires a dedicated backup host.

Important! For cluster environments, perform the following steps on each remote host that you plan to use to back up each cluster node. Each node in a cluster must be backed up.

Follow these steps:

  1. Open a console and log in to the computer that you plan to use as a remote backup host as the root user.
  2. To create the Vertica Linux database administrator user on the remote backup host, type the following command:
    useradd database_admin_user -s /bin/bash
    

    For example:

    useradd dradmin -s /bash/bin  
    

    Note: Create the same Vertica Linux database administrator user on the remote backup host that exists on the Data Repository host. Be sure that the Data Repository host and the remote backup host are not connected to LDAP or the Network Information Service (NIS) and sharing the same Vertica Linux database administrator user.

  3. To set the Vertica Linux database administrator user password, type the following command:
    passwd database_admin_user
    

    For example:

    passwd dradmin
    
  4. To create Vertica directories on the remote backup host, type the following commands:
    mkdir /opt/vertica/bin
    
    mkdir /opt/vertica/oss
    
  5. To change the owner of the Vertica directories, type the following command:
    chown -R dradmin /opt/vertica
    
  6. Log out of the remote backup host.
  7. To set up passwordless ssh on the Data Repository host for the remote backup host, do the following steps:
    1. Open a console and log into the Data Repository host as the Vertica Linux database administrator user.
    2. Type the following commands:
      ssh-keygen -N "" -t rsa -f ~/.ssh/id_rsa 
      cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys2 
      chmod 644 ~/.ssh/authorized_keys2
      
    3. To copy the Vertica Linux database administrator user public key into the remote backup host's list of authorized keys, type the following command:
      ssh-copy-id -i dradmin@backuphost
      
    4. Open a console and log into the remote backup host as the Vertica Linux database administrator user.
    5. To copy the Vertica rsync and python tools from the Data Repository host to the remote backup host, type the following commands:
      scp dradmin@<drhost>:/opt/vertica/bin/rsync /opt/vertica/bin
      scp -r dradmin@<drhost>:/opt/vertica/oss/python /opt/vertica/oss
      
  8. Verify that the remote backup host now has the new /opt/vertica/bin/rsync file directory and the /opt/vertica/oss/python directory.
  9. To create the backup directory on the remote backup host, type the following command:
    mkdir backup_directory
    
    backup_directory

    Indicates the directory where you want to back up Data Repository to. Select a backup directory that is on a disk partition with a large amount of free space. If these directories are not writable by the database administrator user, give this user access to these directories through utilization of the chown and chmod commands.

    Note: In a cluster installation, create the backup directories before you back up the database. You can choose a different backup directory for each host.

    For example:

    mkdir ~dradmin/backups
    

More information:

How to Set Up Automatic Backups of Data Repository (Single-Node and Cluster Installations)