2024. 11. 26. 08:40ㆍ클라우드/GCP
Task 1. Verify Data in the Source Instance for migration

sudo -u postgres psql |
\dt |

select count (*) as countries_row_count from countries; select count (*) as departments_row_count from departments; select count (*) as employees_row_count from employees; select count (*) as jobs_row_count from jobs; select count (*) as locations_row_count from locations; select count (*) as regions_row_count from regions; |

Task 2. Create a Database Migration Service connection profile for a stand-alone PostgreSQL database
Create a new connection profile for the PostgreSQL source instance



Task 3. Create and start a continuous migration job
Create a new continuous migration job


Define the source instance

Create the destination instance





Test and start the continuous migration job


완료되면 create job
Review the status of the continuous migration job


Task 4. Confirm data load in the AlloyDB for PostgreSQL Instance


export ALLOYDB=ALLOYDB_ADDRESS |
echo $ALLOYDB > alloydbip.txt |
psql -h $ALLOYDB -U postgres |
\dt |
select count (*) as countries_row_count from countries; select count (*) as departments_row_count from departments; select count (*) as employees_row_count from employees; select count (*) as jobs_row_count from jobs; select count (*) as locations_row_count from locations; select count (*) as regions_row_count from regions; |
select region_id, region_name from regions; |



sudo -u postgres psql |
insert into regions values (5, 'Oceania'); |
select region_id, region_name from regions; |

select region_id, region_name from regions; |

참고 : https://www.cloudskillsboost.google/focuses/100854?parent=catalog
Migrating to AlloyDB from PostgreSQL Using Database Migration Service | Google Cloud Skills Boost
In this lab, you migrate a stand-alone PostgreSQL database (running on a virtual machine) to AlloyDB for PostgreSQL using a continuous Database Migration Service job with VPC peering for connectivity.
www.cloudskillsboost.google
'클라우드 > GCP' 카테고리의 다른 글
20. Accelerating Analytical Queries using the AlloyDB Columnar Engine (0) | 2024.12.02 |
---|---|
19. Administering an AlloyDB Database (0) | 2024.11.27 |
17. AlloyDB - Database Fundamentals (0) | 2024.11.25 |
16. Connect an App to a Cloud SQL for PostgreSQL Instance (0) | 2024.11.24 |
15. Migrate to Cloud SQL for PostgreSQL using Database Migration Service (0) | 2024.11.23 |