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. Vue中v-model解析、sync修饰符解析

    上善若水,水善利萬物而不爭.——<道德經> 简介 在平时开发是经常用到一些父子组件通信,经常用到props.vuex等等,这里面记录另外的三种方式v-model.sync是怎么使用,再说是 ...

  2. sqlite移植

    编译 # tar xvf sqlite-3.6.16.tar.gz # cd sqlite-3.6.16 # ./configure # ./configure --host=arm-linux -- ...

  3. SetCurrentCellAddressCore 函数的可重入调用

    绑定数据在线程中 private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { if (Di ...

  4. 前后端分离架构:Web实现前后端分离,前后端解耦

    一.前言 ”前后端分离“已经成为互联网项目开发的业界标杆,通过Tomcat+Ngnix(也可以中间有个Node.js),有效地进行解耦.并且前后端分离会为以后的大型分布式架构.弹性计算架构.微服务架构 ...

  5. centos7.5 配置sftp

    1.创建sftp组 groupadd sftp 2.sftp组的用户的home目录统一指定到/u01/sftp下 mkdir -p /u01/sftp/ 3.创建一个sftp用户,用户名为devsft ...

  6. [TI-DSP]sysbios的swi

    SWI: SoftWare Interrupt软件中断 1. 软件中断具有优先级,SWI要一直运行到结束, 2. swi用于事件随机出现,但时间又不是那么急切的情况,hwi处理时间一般在us级,swi ...

  7. 在openwrt上使用autossh(已放弃)

    用了一天后发现,这东西真不靠谱,还不如自已写的SHELL检测重连来的精准和方便,放弃中 参考文章: https://my.oschina.net/umu618/blog/849345 https:// ...

  8. XSLT知识点【一】

    XSL 指扩展样式表语言(EXtensible Stylesheet Language). 它起始于 XSL,结束于 XSLT.XPath 以及 XSL-FO. 起始于 XSL------CSS = ...

  9. Java中创建线程主要有三种方式

    一.继承Thread类创建线程类 (1)定义Thread类的子类,并重写该类的run方法,该run方法的方法体就代表了线程要完成的任务.因此把run()方法称为执行体. (2)创建Thread子类的实 ...

  10. test20190818 NOIP2019 模拟赛

    0+0+20=20,不给大样例,小数据又水,还没有题解的垃圾题. A 题 问题描述: long long ago, Lxhgww 统治的国家里有 n 个城市,其中某一个城市是 capital (首都) ...