官网下载 pgloader-3.4.1-2.rhel7.x86_64.rpm,python-psycopg2 安装
这是shell 运行pgloader 出现 libssl.so被需要 ll | grep libssl.so.1.0. 查找 这个时候可能会出现两条查找结果,
我的是libssl.so.1.0.1e 新建软链接 ln -s /lib64/
libssl.so.1.0.1e /lib64/
libssl.so
这个时候在执行pgloader shell会直接结束命令,说明安装完成 pgloader --help可查看帮助信息
使用时例如
pgloader --type csv --field "id,name" -D /home/hgs -L /home/hgs/test.log --with "fields terminated by \'\\t\'" --with "batch rows = 100000" /home/hgs/test.bcp postgresql://postgres:postgres@192.168.245.137:5432/postgres?tablename=test
详细参数可查看官网
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31506529/viewspace-2152850/,如需转载,请注明出处,否则将追究法律责任。