Validate Migration

Validate Migration

Connect to Target PostgreSQL

  1. Open your terminal
  2. Connect EC2 agian like step 1.7

Monitor Task Status

  1. Install PostgreSQL client:
sudo yum install postgresql15 -y
  1. Connect to PostgreSQL:
psql -h [TARGET-POSTGRES-ENDPOINT] -U postgres -d targetdb
Enter password: MyPassword123!

Verify Migrated Data

  • Run this line
\dt
SELECT COUNT() FROM employees;
SELECT * FROM employees LIMIT 5;
SELECT COUNT() FROM departments;
SELECT * FROM departments;
\d employees
\d departments
  • Result: Monitor Task Status Monitor Task Status

Test CDC (Change Data Capture)

  1. Open a new terminal and connect to MySQL:
mysql -h [SOURCE-MYSQL-ENDPOINT] -u admin -p sampledb
Enter password: MyPassword123!
  1. Insert a new record:
INSERT INTO employees VALUES
(6, 'Alice', 'Green', 'alice.green@company.com', 'IT', 72000.00, '2024-01-10');
  • Result: Monitor Task Status
  1. Go back to PostgreSQL and check:
SELECT COUNT(*) FROM employees;
SELECT * FROM employees WHERE id = 6;
  • Result: Monitor Task Status