阿里云RDS迁移/同步到本地

记录一次阿里云RDS数据库迁移到自建数据库

基本上参照:https://help.aliyun.com/knowledge_detail/44440.html?spm=5176.2000002.0.0.702c382czlcWpT&tdsourcetag=s_pcqq_aiomsg

有些坑要自己踩

1.系统信息

阿里云RDS源数据库为postgresql9.4,本地系统为centos7,

2.准备工作

新建一个非root用户,后面的操作均以postgresql用户进行

useradd postgres
su postgres

3.按照参照的文章进行操作

这里有个小坑:

以下插件如果没有用到可以不安装,否则需要手动安装,安装方法见相应的插件官网:

  1. postgis
  2. plv8
  3. plls
  4. plcoffee
  5. zhparser
  6. pgrouting
  7. rdkit
  8. pg_hint_plan

我迁移的时候需要安装zhparser

wget http://www.xunsearch.com/scws/down/scws-1.2.2.tar.bz2
tar xvf scws-1.2.2.tar.bz2
cd scws-1.2.2
./configure --prefix=/home/postgres/scws
make & make install
wget https://github.com/amutu/zhparser/archive/master.zip
SCWS_HOME=/home/postgres/scws make && make install

 

坑1:

postgres@iZbp18gh20rwbe3iit6he5Z-> pg_ctl start
pg_ctl: another server might be running; trying to start server anyway
server starting
postgres@iZbp18gh20rwbe3iit6he5Z-> FATAL:  XX000: could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(1921129, 17, 03600).
HINT:  This error does *not* mean that you have run out of disk space.  It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter.
        The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.
LOCATION:  InternalIpcSemaphoreCreate, pg_sema.c:125

解决: sysctl -w kernel.sem="5010 1282560 5010 256"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值