port: 15140
socket:
username: dbmgr
password: 520dba
database: test
compress: false
destination:
# if file is given, output goes to file, else postgres.
file:
postgres:
hostname: 100.88.88.88
port: 11005
username: hs
password: hs123
database: pg
# 指定迁移的表,默认迁移database下所有表。if only_tables is given, only the listed tables will be converted. leave
empty to convert all tables.
only_tables:
#- table1
#- table2
tab_testtext
# 指定排除的表。if exclude_tables is given, exclude the listed tables from the conversion.
#exclude_tables:
#- table3
#- table4
# 指定是否只导出表结构,ture表示只迁移dll表结构。if supress_data is true, only the schema definition will be
exported/migrated, and not the data
supress_data: false
# 指定是否只迁移数据,true表示只迁移数据。if supress_ddl is true, only the data will be exported/imported, and not the
schema
supress_ddl: false
# 表存在是否清空导入,true表示清空再导入。if force_truncate is true, forces a table truncate before table loading
force_truncate: false
# if timezone is true, forces to append/convert to utc tzinfo mysql data
timezone: false
# if index_prefix is given, indexes will be created whith a name prefixed with index_prefix
index_prefix:
[root@123]# py-mysql2pgsql -v -f mysql2pgsql.yml
>>>>>>>>>> starting <<<<<<<<<<
start creating tables
start - creating table tab_testtext
finish - creating table tab_testtext
done creating tables
评论