postgresql 备份恢复(三) pg_rman

pg_rman是一款专门为postgresql设计的在线备份恢复的工具。其支持在线和基于时间点备份方式,还可以通过创建backup catalog来维护DB cluster备份信息。

[pg-rman]

看起来好像是模仿oracle的RMAN工具。

 pg_rman特点:

  • 使用简单.一个命令即可完成备份和恢复.
  •  支持在线全备,增量备份,归档备份.
  • 支持备份压缩.通过gzip工具实现页内压缩.
  • 自动备份维护.自动删除过期的WAL备份文件.
  • 支持备份验证.
  • 恢复期间无事务丢失.支持基于PITR的配置文件生成器.

pg_rman平台支持:

ContractedBlock.gif ExpandedBlockStart.gif 代码
 
   
Tested platforms:
OS Edition PostgreSQL Revision Date
Linux Fedora
11 8.4 . 2 23 2009 - 12 - 18
Linux Fedora
11 8.3 . 9 23 2009 - 12 - 18
Linux Fedora
11 8.2 . 15 23 2009 - 12 - 18

Requirements:

* Linux (and some of UNIXes)
* PostgreSQL 8 , 2 , 8.3 , 8.4 , and 8.5

Unsupported platforms:

* Windows
* PostgreSQL 8.1 or prior versions.

 

pg_rman命令参考:

ContractedBlock.gif ExpandedBlockStart.gif 代码
 
   
[postgre@daduxiong etc]$ pg_rman -- help
pg_rman manage backup
/ recovery of PostgreSQL database.

Usage:
pg_rman OPTION init
pg_rman OPTION backup
pg_rman OPTION restore
pg_rman OPTION show [DATE]
pg_rman OPTION show timeline [DATE]
pg_rman OPTION validate [DATE]
pg_rman OPTION delete DATE

Common Options:
- D, -- pgdata = PATH location of the database storage area
- A, -- arclog - path = PATH location of archive WAL storage area
- S, -- srvlog - path = PATH location of server log storage area
- B, -- backup - path = PATH location of the backup storage area
- c, -- check show what would have been done

Backup options:
- b, -- backup - mode = MODE full, incremental, or archive
- s, -- with - serverlog also backup server log files
- Z, -- compress - data compress data backup with zlib
- C, -- smooth - checkpoint do smooth checkpoint before backup
-- keep - data - generations = N keep GENERATION of full data backup
-- keep - data - days = DAY keep enough data backup to recover to DAY days age
-- keep - arclog - files = NUM keep NUM of archived WAL
-- keep - arclog - days = DAY keep archived WAL modified in DAY days
-- keep - srvlog - files = NUM keep NUM of serverlogs
-- keep - srvlog - days = DAY keep serverlog modified in DAY days

Restore options:
-- recovery - target - time time stamp up to which recovery will proceed
-- recovery - target - xid transaction ID up to which recovery will proceed
-- recovery - target - inclusive whether we stop just after the recovery target
-- recovery - target - timeline recovering into a particular timeline

Catalog options:
- a, -- show - all show deleted backup too

Connection options:
- d, -- dbname = DBNAME database to connect
- h, -- host = HOSTNAME database server host or socket directory
- p, -- port = PORT database server port
- U, -- username = USERNAME user name to connect as
- w, -- no - password never prompt for password
- W, -- password force password prompt

Generic options:
- q, -- quiet don ' t write any messages
-- debug debug mode
-- help show this help, then exit
-- version output version information, then exit

Read the website
for details. < http: // code.google.com/p/pg-rman/>
Report bugs to < http: // code.google.com/p/pg-rman/issues/list>.
pg_rman安装:

进入下载http://code.google.com/p/pg-rman/downloads/list

通过解压,然后编译即可使用。

过程非常简单。

转载于:https://www.cnblogs.com/daduxiong/archive/2010/09/01/1815017.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值