-
Notifications
You must be signed in to change notification settings - Fork 131
/
migrate-from-mysql-database-to-postgresql-database.yaml
42 lines (42 loc) · 1.76 KB
/
migrate-from-mysql-database-to-postgresql-database.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Migrate from MySQL Database to PostgresSQL Database
command: "pgloader mysql://{{mysql_username}}:{{mysql_password}}@{{mysql_hostname}}:{{mysql_port}}/{{mysql_database_name}} postgresql://{{postgres_username}}:{{postgres_password}}@{{postgres_hostname}}:{{postgres_port}}/{{postgres_database_name}}"
tags:
- postgresql
- mysql
description: Loads data from the MySQL database, transforms it to PostgreSQL compatible format and uploads it to the PostgreSQL database. Note - it requires pgloader to be installed and both PostgreSQL and MySQL hosts are accessible from the machine running this script.
arguments:
- name: mysql_username
description: The username for the MySQL database.
default_value: ~
- name: mysql_password
description: The password for the MySQL database.
default_value: ~
- name: mysql_hostname
description: The hostname for the MySQL database.
default_value: ~
- name: mysql_port
description: The port for the MySQL database.
default_value: 3306
- name: mysql_database_name
description: The name of the MySQL database.
default_value: ~
- name: postgres_username
description: The username for the PostgreSQL database.
default_value: ~
- name: postgres_password
description: The password for the PostgreSQL database.
default_value: ~
- name: postgres_hostname
description: The hostname for the PostgreSQL database.
default_value: ~
- name: postgres_port
description: The port for the PostgreSQL database.
default_value: 5432
- name: postgres_database_name
description: The name of the PostgreSQL database.
default_value: ~
source_url: "https://docs.dipak.tech/database/postgres/postgres-migration"
author: Dipak Parmar
author_url: "https://github.com/dipakparmar"
shells: []