Previous Topic: Configure Data RepositoryNext Topic: Back Up Data Aggregator


Restore Data Repository

You can restore Data Repository after it was backed up. This procedure assumes that the database administrator user is part of the sudoers file.

Note: 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 have to be the same:

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
    

    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. Open a command prompt and type the following command:
    service dadaemon stop
    

    Note: For information about creating a sudouser with access to a limited set of commands, see the Data Aggregator Installation Guide.

    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.

    Note: 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
      

      Note: In a cluster installation, you can run the restore task from any of the hosts that are participating in the cluster.

    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_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
      

      Note: In a cluster installation, you can run the restore task from any of the hosts that are participating in the cluster.

  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 Data Aggregator by logging in to the computer where Data Aggregator is installed as the root user or sudo user with access to a limited set of commands. Type the following command:
    /etc/init.d/dadaemon start
    

    Data Aggregator starts.

  13. Restart all Data Collector hosts that are associated with Data Aggregator:
    1. Select Admin, Data Source Settings, and click a Data Aggregator data source.
    2. Click Data Collectors from the System Status menu.
    3. Select all Data Collector hosts that are associated with Data Aggregator and click Start.

    Data Collector hosts start.