The page has been translated by Gen AI.

Vertica

Vertica

Overview

This document guides you through the process of migrating your existing Vertica to SCP-V2.
It introduces the Data Migration tool and Data verification method, and provides a migration example based on a scenario, including commands.

Pre-migration tasks

  • When creating the target TO-BE DB, create the CATALOG, DATA, and TEMP areas in the same directory path as AS-IS.
  • Install the same Vertica version as AS-IS (including hotfixes).
  • Ensure the number of nodes, node names, and DB names are identical.
  • Ensure password-less communication between AS-IS and TO-BE nodes.
  • When replicating a cluster, network performance must be guaranteed for a quick transition.

Migration procedure


Scenario

  • Environment: Operating Vertica on-premises, data size 500GB, analysis tasks
  • Requirements: Migrate to Samsung Cloud Platform v2 Vertica (DbaaS), allow a maximum of 24 hours of service downtime

Migration tool

vbr_copy_cluster

  • This method uses the vbr utility, which is a backup tool embedded in Vertica, to replicate the data from the local backup to the Vertica cluster configured in the Samsung Cloud Platform v2 environment.
  • The copycluster option of vbr allows you to copy the entire database from one Vertica cluster to another.
  • Vertica backs up the data from the source cluster and restores it to the target cluster in a single operation.
  • When copying data using the vbr script with the copycluster option, all data in the target cluster will be overwritten.

1. Migration planning

  • Since the entire database is being migrated, the cluster replication method using vbr copy_cluster is utilized.
  • Although the source Vertica can be online during migration, data consistency must be ensured by only allowing query operations during the migration process, as data changed after the last backup will not be migrated.
  • Password-less communication between the source and target nodes is required for this method.
  • Since the data is transmitted without additional processing, data verification is not necessary, but if required, it can be performed by comparing the number of rows and sum of columns for each table (e.g., sum for numeric types and length sum for character types).

2. Create target cluster

  • Create the target DB through the Samsung Cloud Platform Console by navigating to the following menu:
    Data Analytics > Vertica(DBaaS) > Create Vertica


3. Create a database with the same name as the source database in the target database

Create a database with the same name as the source database in the target database

  • Example: htest

    [Target DB]
    $ /opt/vertica/bin/admintools -t create_db -s 192.168.xx.x -d htest
    Info: no password specified, using none
    Database with 1 or 2 nodes cannot be k-safe and it may lose data if it crashes
    Database htest created successfully.


4. Stop the target database


[Target DB]
$ /opt/vertica/bin/admintools -t stop_db -d htest -p htestpasswd
Info: no password specified, using none
Connecting to database
Issuing shutdown command to database
Database htest stopped successfully.


5. Create a configuration file on the source database

Create a configuration file based on the /opt/vertica/share/vbr/example_configs/copycluster.ini file.


[Source DB]
$ vi copycluster.ini
--- copycluster.ini
[Misc]
snapshotName = CopyTest
tempDir = /tmp/vbr
retryCount = 2
retryDelay = 1
passwordFile = /home/htest/.backup_pwd

[Database]
dbName = htest
dbUser = htest
dbPromptForPassword = False

[Transmission]
port_rsync = 50000

[Mapping]
v_htest_node0001 = 192.168.xx.x

[Source DB]
$ vi /home/htest/.backup_pwd
[Passwords]
dbPassword = password!


6. Run the vbr script on the source database

Run the vbr script using the –copycluster option with the configuration file (copycluster.ini) created earlier.

[Source DB]
$ /opt/vertica/bin/vbr --config-file copycluster.ini --task copycluster
Starting copy of database htest.
Participating nodes: v_htest_node0001.
Snapshotting database.
Snapshot complete.
Determining what data to copy.
[==========================================] 100%
Approximate bytes to copy : 627459683 of 627459683 total.
Syncing data to destination cluster.
[==========================================] 100%
Reinitializing destination catalog.
copycluster complete!


7. Start the target database and verify data

Start the target database.

[Target DB]
$ /opt/vertica/bin/admintools -t start_db -d htest -p htestpasswd
Info: no password specified, using none
Starting nodes:
v_hest_node0001 (192.168.xx.x) Starting Vertica on all nodes. Please wait, database with large catalog may take a while to initialize.
Node Status: v_htest_node0001: (DOWN)
Node Status: v_htest_node0001: (DOWN)
Node Status: v_htest_node0001: (DOWN)
Node Status: v_htest_node0001: (DOWN)
Node Status: v_htest_node0001: (UP)
Database htest started successfully


Note: The original text has been translated to English while maintaining the original Markdown format and structure.