Skip to content

zijing66/mysql_to_postgresql_merger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql_to_postgresql_merger

Merges a MySQL dump data and a PgSQL dump data with the right format so it can be directly imported to a new PostgreSQL database.

Data Dump using:

mysqldump -t --compatible=postgresql --default-character-set=utf8 -uroot -p gitlabhq_production -r mysql_gitlabhq_production_dataonly.mysql
pg_dump -a -U postgres gitlabhq_production -f postgres_gitlabhq_production_dataonly.dump

DDL Dump using:

pg_dump -s -U postgres gitlabhq_production -f postgres_gitlabhq_production_ddlonly.dump

Example:

# Execcute this script using:  
db_data_merge.py mysql_gitlabhq_production_dataonly.mysql postgres_gitlabhq_production_ddlonly.dump gitlabhq_production_merged.psql

# PostgreSQL Restore
psql -U postgres -d gitlabhq_production -f gitlabhq_production_merged.psql

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages