Barman 安装
Barman需要用到psql客户端,所以需要在Barman服务器安装psql数据库 1 linux操作系统环境准备: python版本:2.6或2.7
yum -y install epel-release.noarch
yum -y install python-argcomplete.noarch
yum -y install python-argh.noarch
yum -y install python-psycopg2.x86_64 python-psycopg2-doc.x86_64
yum -y install python-dateutil.noarch python-dateutil15.noarch
yum -y install rsync.x86_64 2 创建barman系统用户
groupadd barman
useradd -g barman barman
passwd barman 3 安装Barman
# tar -zxvf barman-1.4.0.tar.gz
# chown -R barman:barman barman-1.4.0 [barman@localhost barman-1.4.0]$ ./setup.py build
[root@localhost barman-1.4.0]# ./setup.py install
[root@localhost barman-1.4.0]# su - barman
[barman@localhost ~]$ cd /software/barman-1.4.0
[barman@localhost barman-1.4.0]$ ./setup.py install --user 将Barman配置文件Barman.conf拷贝到~/.barman.conf
[barman@localhost ~]$ cp /software/barman-1.4.0/doc/barman.conf ~/.barman.conf
[barman@localhost ~]$ ls -al
-rw-r--r-- 1 barman barman 2863 Feb 12 15:57 .barman.conf 4 配置.barman.conf文件:
[main-test]
description = "test"
ssh_command = ssh barman@barmanIP
conninfo = host=IP user=postgres
incoming_wals_directory: /barman_backup/main-test/incoming
minimum_redundancy = 1
retention_policy = REDUNDANCY 2 5 Barman服务器与数据库服务器之间做互信
[barman@localhost ~]$ ssh-keygen -t rsa
[barman@localhost ~]$ ssh-copy-id -i .ssh/id_rsa.pub barman@IP
[barman@localhost ~]$ ssh barman@IP [barman@erp ~]$ ssh-keygen -t rsa
[barman@erp ~]$ ssh-copy-id -i .ssh/id_rsa.pub barman@barmanIP
[barman@erp ~]$ ssh barman@barmanIP 6 基于时间点的恢复: --基于时间的恢复将数据库恢复到read only状态
[barman@slony ~]$ barman recover --target-time "2015-02-27 15:25:00" --remote-ssh-command "ssh postgres@IP" main-test 20150227T141803 /home/postgres/pgdata **********************************************************************************
Barman备份standby数据库: 在standby库操作:
安装pgespresso-master.zip --https://github.com/2ndquadrant-it/pgespresso
[postgres@segdb1 pgespresso-master]$ make
[postgres@segdb1 pgespresso-master]$make install [postgres@segdb1 ~]$ psql
postgres=# CREATE EXTENSION pgespresso; 在Barman服务器:
vi .barman.conf
添加
backup_options = concurrent_backup 注:
必须将主服务器的归档日志归档到:/home/barman/barman/main-test-standby/incoming目录下
archive_command = 'rsync -a %p barman@barmanIP:/barman_backup/main-test/incoming/%f'
Barman 安装的更多相关文章
- Barman安装及备份PostgreSQL
barman特点 零数据丢失备份.保证用户在只有一台备份服务器的情况下达到零数据丢失. 与备份服务器合作.允许备份服务器在与主服务器的流式复制不可用时,从barman获取wal文件. 可靠的监控集成. ...
- 【转载】使用barman备份PostgreSQL
什么是barman Barman (备份和恢复管理器) 是 PostgreSQL 数据库服务器中非常方便的备份和恢复工具,允许远程备份多个服务器,允许从一个备份集中一个命令就恢复数据库.同时还可以对多 ...
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法
如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...
- Sublime Text3安装JsHint
介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...
- Fabio 安装和简单使用
Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...
- gentoo 安装
加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...
随机推荐
- 【kafka】安装部署kafka集群(kafka版本:kafka_2.12-2.3.0)
3.2.1 下载kafka并安装kafka_2.12-2.3.0.tgz tar -zxvf kafka_2.12-2.3.0.tgz 3.2.2 配置kafka集群 在config/server.p ...
- python(open文件读取)
一.open文件读取 1.open('file','mode')打开一个文件 file 要打开的文件名,需加路径(除非是在当前目录) mode 文件打开的模式 需要手动关闭close 2.with o ...
- go工程组织规范
go编码以workspace形式管理,一个workspace包含所有的Go编码,包含多个版本控制仓库(例如使用git管理的多个仓库).每个仓库包含多个包package,每个package是一个单独的路 ...
- UIP和lwip的区别 转载
uIP是专门为8位和16位控制器设计的一个非常小的TCP/IP栈.完全用C编写,因此可移植到各种不同的结构和操作系统上,一个编译过的栈可以在几KB ROM或几百字节RAM中运行.uIP中还包括一个HT ...
- Spring+WebSocket+SockJS实现实时聊天
设计初衷是通过websocket实现网页实时通讯聊天. 工程环境:tomcat8+jdk1.7+maven+eclipse 设计思路:客户端登录网页建立socket连接,后台记录用户连接信息并做标识: ...
- jenkins+ant+jmeter接口自动化的持续集成
一.jmeter.jenkins安装 这里不再说明,请看上一个随笔!!! 链接:https://www.cnblogs.com/magicYJ/p/11839646.html 二.ant安装 下载地址 ...
- CentOS 7 修改时区例如上海时区
Linux 系统(我特指发行版, 没说内核) 下大部分软件的风格就是不会仔细去考虑向后 的兼容性, 比如你上个版本能用这种程序配置, 没准到了下一个版本, 该程序已经不见了. 比如 sysvinit ...
- Kotlin扩展作用域分析与扩展的根本作用解析
在上一次https://www.cnblogs.com/webor2006/p/11219358.html学习了Kotlin的扩展,继续这个话题继续拓展,首先提出这么一个问题:假如我们扩展的方法跟类中 ...
- 前端学习笔记--css案例
要实现的案例: 1.分析布局 2.划分文件结构: 3.编写css代码 * { padding: 0; margin: 0; } body { font-size: 16px; color: burly ...
- Exec Maven插件
1.为什么使用exec? 现在的工程往往依赖 众多的jar包,不像war包工程,对于那些打包成jar包形式的本地java应用来说,通过java命令启动将会是一件极为繁琐的事情,原因很简单,太 多的依赖 ...