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. Winmanager,NERDTree和MiniBufExplorer

    NERDTree树形浏览文件 MiniBufExplorer多文件同时编辑 Winmanager将NERDTree和MiniBufExplorer界面整合 下载 http://www.vim.org/ ...

  2. Computer Vision_33_SIFT: A novel point-matching algorithm based on fast sample consensus for image registration——2015

    此部分是计算机视觉部分,主要侧重在底层特征提取,视频分析,跟踪,目标检测和识别方面等方面.对于自己不太熟悉的领域比如摄像机标定和立体视觉,仅仅列出上google上引用次数比较多的文献.有一些刚刚出版的 ...

  3. SQL SERVER-记录对表操作的触发器

    CREATE TRIGGER [dbo].[KNMT_LOG] ON [dbo].[KNMT] FOR UPDATE, DELETE AS ) ) ) ) DECLARE @STATMT AS VAR ...

  4. Host is not allowed to connect to this MySQL server

    解决方法: [root@GYQ-Prod-Zabbix ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Com ...

  5. Linux命令——e2fsck

    简介 e2fsck字面意义上理解时,Ext2 FileSystem Check,但他实际上不仅仅对Ext2有用,对Ext家族都有用,即Ext2/3/4d都也可以使用. 5 UNIX / Linux e ...

  6. 2013.4.29 - KDD第十一天

    今天上午在图书馆写FIrst集,真心没写出来,算法是昨天找好的,不过实现的话还是需要很大的代码量,然后就打算用郑茂或者韩冰的代码了. 晚上图书馆快关门的时候开始思考KDD的问题, 我一开始打算给中秋发 ...

  7. 从锅炉工到AI专家 ---- 系列教程

    TensorFlow从1到2(十二)生成对抗网络GAN和图片自动生成 那些令人惊艳的TensorFlow扩展包和社区贡献模型  从锅炉工到AI专家(11)(END) 从锅炉工到AI专家(10)  从锅 ...

  8. 生成一个uuid字符串,并去除多余的符号

    for(int i=0;i<10;i++){ String uuid = UUID.randomUUID().toString().replaceAll("-", " ...

  9. 怎么给win10进行分区?

    新安装的win10系统的朋友,对于win10系统分区不满意应该如何是好呢?今天给大家介绍两种win10系统分区的方法,一个是windows自带分区管理软件来操作;另一个就是简单方便的分区助手来帮助您进 ...

  10. (java)selenium webdriver学习---三种等待时间方法:显式等待,隐式等待,强制等待

    selenium webdriver学习---三种等待时间方法:显式等待,隐式等待,强制等待 本例包括窗口最大化,刷新,切换到指定窗口,后退,前进,获取当前窗口url等操作: import java. ...