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 服务器安装操 ...
随机推荐
- Android里的Dalvik、ART、JIT、AOT有什么关系?
JIT,Just-in-time,即时编译,边运行边编译: AOT,Ahead Of Time,提前编译,指运行前编译. 区别 这两种编译方式的主要区别在于是否在“运行时”进行编译 优劣JIT优点: ...
- 【hbase】hbase理论学习
HBase用途: 基于Hadoop Distributed File System,是一个开源的,基于列存储模型的分布式数据库. HBase简介: HBase是一个分布式的.多版本的.面向列的开源数据 ...
- python判断目录或者文件
1. 判断目录是否存在 'isdir',删除目录时只有该目录为空才可以 'rmdir' import os if(os.path.isdir('D:/Python_workspace/spyder_s ...
- unity 之 场景切换进度条显示
一.UI.建立slider适当更改即可: 二.新增loadScene脚本,用来进行场景切换,将其绑定任意物体上面.博主以放置主相机为例.参数分别为进度条(用来设置value值),显示进度文本text: ...
- UVA816 Abbott's Revenge (三元组BFS)
题目描述: 输入输出: 输入样例: SAMPLE 3 1 N 3 3 1 1 WL NR * 1 2 WLF NR ER * 1 3 NL ER * 2 1 SL WR NF * 2 2 SL WF ...
- 题解 洛谷P4872 【OIer们的东方梦】
一道码量比较大的广搜题,但让我这个辣鸡小学生自闭了一天呜呜呜. 一开始看数据\(n,m \leq 1000\)也并不是特别大,于是用就开始用广搜乱水了. 由于这道题每走一步的代价不是\(1\),所以并 ...
- SVM:从数学上分析为什么优化cost function会产生大距离(margin)分类器
向量内积 uTv = vTu为两个二维向量的内积,它等于p*||u||(其中p为向量v在向量u上的投影长度,是有+/-之分的,||u||为向量u的长度也称为范数),它是一个实数(是一个标量). 如上图 ...
- new char()与new char[]区别
char *pc = new char(15); //开辟一个内存单元,并用括号里的初始化(用15来初始化你定义的指针所指向的那个char)char *pc = new char[15]; //开辟一 ...
- restful接口规范 | 基于restful的原生django接口
restful接口规范 接口 接口:联系两个物质的媒介,完成信息交互 web程序中:联系前台页面与后台数据库的媒介 web接口组成: - url:长得像返回数据的url链接 - 请求参数:前台按照指定 ...
- RCNN,Fast RCNN,Faster RCNN 的前生今世:(4) Fast RCNN 算法详解
继2014年的RCNN之后,Ross Girshick在15年推出Fast RCNN,构思精巧,流程更为紧凑,大幅提升了目标检测的速度.在Github上提供了源码. 同样使用最大规模的网络,Fast ...