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 安装的更多相关文章

  1. Barman安装及备份PostgreSQL

    barman特点 零数据丢失备份.保证用户在只有一台备份服务器的情况下达到零数据丢失. 与备份服务器合作.允许备份服务器在与主服务器的流式复制不可用时,从barman获取wal文件. 可靠的监控集成. ...

  2. 【转载】使用barman备份PostgreSQL

    什么是barman Barman (备份和恢复管理器) 是 PostgreSQL 数据库服务器中非常方便的备份和恢复工具,允许远程备份多个服务器,允许从一个备份集中一个命令就恢复数据库.同时还可以对多 ...

  3. docker——容器安装tomcat

    写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...

  4. 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法

    如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...

  5. Sublime Text3安装JsHint

    介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...

  6. Fabio 安装和简单使用

    Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...

  7. gentoo 安装

    加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...

  8. 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. ...

  9. 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 服务器安装操 ...

随机推荐

  1. kubernetes 集群添加node节点

    kubernetes 集群添加node节点 注意,我们并不需要把新增的node ip加入到证书里重新生成!!! 下面我们以添加node03为例 一.添加集群里个节点的hostname并设置好对应主机名 ...

  2. 使用wc -l 来统计代码行数

    Linux使用wc来统计行数真的好用 如在当前路径下统计一共多少行代码 $ find ./ -name *.c |xargs wc -l #包括了空行 ##-l :lines 如果不包括空行 ¥fin ...

  3. lomback插件在日志管理方面的应用

    由于现在使用日志可以省去在解决bug时候的很多麻烦, lomback为我们提供了很方便的打印日志的管理 @RunWith(SpringRunner.class) @SpringBootTest @Sl ...

  4. ArcGIS API for JS 4.x 离线部署(https)

    在离线部署查资料的过程中,基本全部都是部署在“Default Web Site”下面,部署在这个下面的默认是 http 方式请求的.并且不能修改. 但是系统中请求的都是 https,这样导致请求不到J ...

  5. 大数据之路week07--day06 (Sqoop 将关系数据库(oracle、mysql、postgresql等)数据与hadoop数据进行转换的工具)

    为了方便后面的学习,在学习Hive的过程中先学习一个工具,那就是Sqoop,你会往后机会发现sqoop是我们在学习大数据框架的最简单的框架了. Sqoop是一个用来将Hadoop和关系型数据库中的数据 ...

  6. SQL Server视频总结

    经过这几天艰苦卓绝的奋斗,我终于把视频看完了,可是不知道自己看了什么,下面就来总结一下,看看都学到了那些. 数据库和VB中有很多地方相似,我们可以直接搬过来,而不必再当做新知识给自己增加难度,要调动自 ...

  7. wampserver - windows服务器下php运行环境配置

    之前一直在通过windows server IIS跑php程序,直到后来,发现了她 “wampserver", 一个法国的windows+apache+php+mysql部署包. 感觉挺好用 ...

  8. idea Mapper.java中快速生成@Param注解

    1.鼠标悬浮到方法后 2.Ctrl+Enter打开操作列表 3.选择[Mybatis] Generate @Param自动生成@Param() 4.说明:@Param("参数名") ...

  9. VS Code中配置Markdown

    其实,对我来说是反过来的,我是为了使用Markdown而安装VS Code(虽然久仰大名) 安装VS Code 安装Markdown插件 使用篇 1. 安装vscode 之所以啰嗦一下,是因为据说安装 ...

  10. 什么是粘包? socket 中造成粘包的原因是什么? 哪些情况会发生粘包现象?

    只有TCP有粘包现象,UDP永远不会粘包! 粘包:在接收数据时,一次性多接收了其它请求发送来的数据(即多包接收).如,对方第一次发送hello,第二次发送world, 在接收时,应该收两次,一次是he ...