Restore Data Repository

You can restore Data Repository from an existing backup. To restore Data Repository, ensure that the database administrator user is part of the sudoers file.
capm360
You can restore Data Repository from an existing backup. To restore Data Repository, ensure that the database administrator user is part of the sudoers file.
Do not restore a backup of an older release into a newer environment. The data from the older version might not be fully compatible with schema changes.
Usually, you restore Data Repository to the same computer where you backed it up from. However, you
can
restore Data Repository to a different computer. The computer that you restore to must be configured in the same way that the computer you backed up Data Repository from is. In a cluster environment, each computer you restore to must be configured in the same way that each computer you backed up each Data Repository node from is.
The following configurations must be the same:
  • the IP address
  • the hostname
  • the catalog and data directories
  • the catalog and data directory permissions
  • the Vertica Linux database administrator user credentials
  • the database administrator user account credentials
  • the database user account credentials
Follow these steps:
  1. Stop all Data Collector hosts that are associated with Data Aggregator by logging in to the computers where Data Collector is installed as the root user or a sudo user with access to a limited set of commands. Open a command prompt and type the following command:
    service dcmd stop
    For RHEL 7.x or OL,
    service
    invokes
    systemctl
    . You can use
    systemctl
    instead.
    Data Collector hosts stop.
  2. Stop Data Aggregator by logging in to the computer where Data Aggregator is installed as the root user or a sudo user with access to a limited set of commands. Do one of the following steps:
    • Stop the Data Aggregator service:
      service dadaemon stop
    • (Fault tolerant environment) If the local Data Aggregator is running, run one the following commands to shut it down and prevent it from restarting until maintenance is complete:
      • RHEL 6.x:
        service dadaemon maintenance
      • RHEL 7.x, SLES, or OL:
        DA_Install_Directory/scripts/dadaemon maintenance
    Data Aggregator stops.
  3. Log in to the database server you use for Data Repository as the database administrator user,
    not
    as the root user.
  4. Type the following command:
    /opt/vertica/bin/adminTools
    The Administration Tools dialog opens.
  5. Select (4) Stop Database.
  6. Press the Space bar next to the database name, select OK, and press Enter.
    You are prompted for the database password.
  7. Enter the database password and press Enter.
    Data Repository stops.
    If Data Repository does not stop, select (2) Stop Vertica on Host from the (7) Advanced Tools Menu.
  8. Select Exit and press Enter.
  9. To prepare to restore the Data Repository backup, log in as the Linux user account for the database administrator user to the database server you use for Data Repository.
    When you set up automatic backups of Data Repository, you configured the configuration file with a restore point of seven. Data Repository can be restored to the most recent backup or to any of the previous seven incremental backups.
  10. Do one of the following steps:
    1. To restore Data Repository to the most recent backup, type the following command:
      /opt/vertica/bin/vbr.py --task restore --config-file configuration_directory_path_filename
      • configuration_directory_path_filename
        Indicates the filename and directory path of the configuration file you created when you ran the backup configuration procedure. This file is located where you ran the backup utility (/opt/vertica/bin/vbr.py).
      For example:
      /opt/vertica/bin/vbr.py --task restore --config-file /home/vertica/vert-db-production.ini
      In a cluster installation, you can run the restore task from any of the hosts that are participating in the cluster.
      For a list of available restore points, run the following command:
      /opt/vertica/bin/vbr.py --task listbackup --config-file configuration_directory_path_filename
    2. To restore Data Repository to any of the previous seven incremental backups, type the following command:
      /opt/vertica/bin/vbr.py --task restore --config-file
      configuration__directory_path_filename
      --archive
      archive_name
      • configuration_directory_path_filename
        Indicates the filename and directory path of the specific configuration file you want to restore a specific archive from. You created this configuration file when you ran the backup configuration procedure. This file is located where you ran the backup utility (/opt/vertica/bin/vbr.py).
      • archive_name
        Indicates the name of the specific restore point that you want to restore to. Change to the backup directory that the configuration file for the restore point indicates. All of the restore points that are available are listed. Determine the archive name for the restore point that you want to restore to.
      For example:
      /opt/vertica/bin/vbr.py --task restore --config-file myconfig.ini --archive 20131020_170018
      In a cluster installation, you can run the restore task from any of the hosts that are participating in the cluster.
      For a list of available restore points, run the following command:
      /opt/vertica/bin/vbr.py --task listbackup --config-file configuration_directory_path_filename
  11. Restart Data Repository by logging in to the computer where Data Repository is installed as the database administrator user,
    not
    as the root user. Open a command prompt and do the following steps:
    1. Type the following command:
      /opt/vertica/bin/adminTools
      The Administration Tools dialog opens.
    2. Select (3) Start Database.
    3. Press the Space bar next to the database name, select OK, and press Enter.
      You are prompted for the database password.
    4. Enter the database password and press Enter.
      Data Repository starts.
    5. Select Exit and press Enter.
  12. Restart the Data Aggregator. Log in to the Data Aggregator host as the root user or a sudo user, and start the dadaemon service. Do one of the following steps:
    • Start the Data Aggregator service:
      service dadaemon start
    • (Fault tolerant environment) If the local Data Aggregator is running, run one the following commands to shut it down and prevent it from restarting until maintenance is complete:
      • RHEL 6.x:
        service dadaemon maintenance
      • RHEL 7.x, SLES, or OL:
        DA_Install_Directory/scripts/dadaemon maintenance
    Data Aggregator starts.
  13. Restart the Data Collectors. Log in to each Data Collector host as the root user or a sudo user, and start the dcmd service:
    Data Collector hosts start.