当前位置:网站首页>Kunlunbase instruction manual (III) data import & synchronization
Kunlunbase instruction manual (III) data import & synchronization
2022-07-29 10:31:00 【InfoQ】
One 、 Environmental Science
Two 、 Data export and import steps
2.1 In tables
2.1.1 Derived table structure
pg_dump -h 192.168.0.142 -p 5432 -tcustomer1_3 -t customer1_4 postgres-s>customer1_34str.sql (-s The parameter is only inverted table structure )
2.1.2 Export table data
pg_dump -h 192.168.0.142 -p 5432 -tcustomer1_3 -t customer1_4 postgres -a >customer1_34_data.sq
2.1.3 Restore table structure
psql --dbname=bktest3 --host=192.168.0.142 --port=5401 -U abc -f customer1_34str.sql
2.1.4 Restore table data
psql --dbname=bktest3 --host=192.168.0.142 --port=5401 -U abc -f customer1_34_data.sql
2.2 In terms of databases
2.2.1 Export full table structure
pg_dump -d postgres -U postgres -s>postgres_str.sql
2.2.2 Export the table data of the whole library
pg_dump -d postgres -U postgres -a>postgres_data.sql
pg_dump -d postgres -U postgres -a -Fc >postgres_data.dump ( Minimum size )
pg_dump -d postgres -U postgres -a -Ft >postgres_data.tar
2.2.3 Restore the whole database table structure
psql --dbname=bktest2 --host=192.168.0.142 --port=5401 -U abc -f postgres_str.sql
2.2.4 Restore all database table data
psql --dbname=bktest2 --host=192.168.0.142 --port=5401 -U abc -f postgres_data.sql
pg_restore -h 192.168.0.142 -p 5401 -U abc-d bktest2 postgres_data.dump
2.3 Oracle GoldenGate Real time synchronization PostgreSQL To KunlunBase
2.3.1 Installation and deployment Oracle GoldenGate

2.3.2 To configure PostgreSQL Data sources and KunlunBase The goal is
alter system set wal_level='logical';
alter system set max_replication_slots = 20;
[ODBC Data Sources]
PGDSN1=DataDirect 14 PostgreSQL Wire Protocol
PGDSN2=DataDirect 11 PostgreSQL Wire Protocol
[ODBC]
IANAAppCodePage=106
InstallDir=/ogg21/ogg_ma
[PGDSN1]
Driver=/ogg21/ogg_ma/lib/GGpsql25.so
Description=DataDirect 14 PostgreSQL Wire Protocol
Database=PGSOUR
HostName=192.168.0.10
PortNumber=5432
LogonID=postgres
Password=Kunluntest
[PGDSN2]
Driver=/ogg21/ogg_ma/lib/GGpsql25.so
Description=DataDirect 11 PostgreSQL Wire Protocol
Database=KunlunDB
HostName=192.168.0.12
PortNumber=5401
LogonID=postgres
Password=Kunluntest
2.3.3 Configure replication environment



2.3.4 To configure & Start extraction process

extract ext1
SETENV(PGCLIENTENCODING = "UTF8" )
SETENV(ODBCINI="/ogg21/ogg_ma/odbc.ini" )
SOURCEDB PGDSN1 USERIDALIAS PG1, DOMAIN OGGMA
exttrail ./dirdat/e1
IGNOREREPLICATES
TRANLOGOPTIONS FILTERTABLE ogg.ckpt
table public.*;
2.3.5 To configure & Start the replication process

replicat rep1
SETENV(PGCLIENTENCODING = "UTF8" )
SETENV(ODBCINI="/ogg21/ogg_ma/odbc.ini" )
SETENV(NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
TARGETDB PGDSN2 USERIDALIAS PG2, DOMAIN OGGMA
map public.*, target public.*;
2.3.6 Perform synchronization and check synchronization


2.3.7 Pressure test
sysbench oltp_read_write --table-size=100000 --tables=10 --pgsql-host=192.168.0.10 --pgsql-port=5432 --pgsql-user=postgres --pgsql-password=Kunluntest --pgsql-db=PGSOURE --db-ps-mode=disable --threads=1 --db-driver=pgsql prepare
sysbench oltp_read_write --table-size=100 --tables=10 --pgsql-host=192.168.0.12 --pgsql-port=5401 --pgsql-user=abc --pgsql-password=abc --pgsql-db=postgres --db-ps-mode=disable --threads=10 --db-driver=pgsql --time=600 run
select count(*) from sbtest10;
count
-------
100000
(1 row)
END
边栏推荐
- 2022cuda summer training camp day3 practice
- What is the difference between a global index and a local index?
- 【论文阅读】Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- R 语言 二分法与 牛顿迭代法计算中方程的根
- 2022cuda summer training camp Day6 practice
- 2022cuda summer training camp Day1 practice
- Introduction to distributed scheduling xxl-job features
- Understanding of Arduino circuit
- Summer 2022 software innovation laboratory training JDBC
- After eating Alibaba's core notes of highly concurrent programming, the backhand rose 5K
猜你喜欢
Shell notes (super complete)
【黑马早报】每日优鲜回应解散,多地已无法下单;李斌称蔚来将每年出一部手机;李嘉诚欲抄底恒大香港总部大楼;今年国庆休7天上7天...
VMWare:使用命令更新或升级 VMWare ESXi 主机
98. (cesium chapter) cesium point heat
云服务大厂高管大变阵:技术派让位销售派
[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types
PDF处理还收费?不可能
How beautiful can VIM be configured?
12th generation core processor +2.8k OLED ASUS good screen, lingyao 142022 shadow cyan glaze business thin book
SAP Fiori @OData. Analysis of the working principle of publish annotation
随机推荐
二次握手??三次挥手??
2022cuda summer training camp Day5 practice
2022cuda summer training camp Day1 practice
Talk about multithreaded concurrent programming from a different perspective without heap concept
JS temporary dead zone_ Temporary
[jetson][reprint]pycharm installed on Jetson
跟着田老师学实用英语语法(持续更新)
跟着李老师学线代——行列式(持续更新)
MySQL优化理论学习指南
This is the right way for developers to open artifacts
Docker installation, redis configuration and remote connection
跟着李老师学线代——矩阵(持续更新)
根据给定字符数和字符,打印输出“沙漏”和剩余数
[semantic segmentation] 2021-pvt2 cvmj
Atomic operation of day4 practice in 2022cuda summer training camp
Create PHP message board system with kubernetes
Research on the realization of linear gradient circular progress bar
R语言 使用数据集 veteran 进行生存分析
Hanyuan high tech Gigabit 2-optical 6-conductor rail managed Industrial Ethernet switch supports X-ring redundant ring network one key ring network switch
【黑马早报】每日优鲜回应解散,多地已无法下单;李斌称蔚来将每年出一部手机;李嘉诚欲抄底恒大香港总部大楼;今年国庆休7天上7天...