标签云
asm恢复 asm 恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (101)
- 数据库 (1,629)
- DB2 (22)
- MySQL (71)
- Oracle (1,493)
- Data Guard (50)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (158)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (13)
- ORACLE 21C (3)
- Oracle 23ai (3)
- Oracle ASM (65)
- Oracle Bug (7)
- Oracle RAC (48)
- Oracle 安全 (6)
- Oracle 开发 (27)
- Oracle 监听 (27)
- Oracle备份恢复 (545)
- Oracle安装升级 (89)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (75)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- oracle 23ai(23.5.0.24.07)完整功能版安装体验
- win平台安装oracle遭遇INS-30131处理
- 配置win环境ssh和sftp并实现免密登录
- 11.2.0.4最新psu-202407
- Oracle 19c 2024.07补丁(RUs+OJVM)
- ORA-00756 ORA-10567故障处理
- ORA-01092 ORA-00604 ORA-08103故障处理
- 数据库启动报ORA-600 6711故障分析处理
- RMAN SBT_TAPE备份无法被DISK通道识别
- ORA-27154 ORA-27300 ORA-27301 ORA-27302故障处理
- Patch SCN工具for Linux
- awr创建snapshot等待library cache: mutex X
- exadata换flash卡的一些操作
- RMAN-06207 RMAN-06208报错解决
- RAC主机相差超过10分钟导致crs无法启动
- O/S-Error: (OS 23) 数据错误(循环冗余检查)—故障处理
- 异常断电数据库恢复-从ORA-600 2131到ORA-08102: 未找到索引关键字, 对象号 39
- 数据泵迁移Wrapped PLSQL之后报PLS-00753
- 数据库open报ORA-600 kcratr_scan_lastbwr故障处理
- resetlogs强制拉库失败并使用备份system文件还原数据库故障处理
标签归档:pg_rman安装
PostgreSQL备份工具pg_rman安装
学习oracle的同学都清楚,oracle的rman是最好的备份工具(一般第三方备份软件也基本上是通过调用rman的备份接口实现的)
pg_rman下载地址https://github.com/ossc-db/pg_rman/releases,下载和当前pg版本/操作系统版本对应的pg_rman包
安装pg_rman缺少包
缺少libpq.so.5()和postgresql10-libs相关的包
[root@localhost lib]# rpm -ivh /tmp/pg_rman-1.3.6-1.pg10.rhel7.x86_64.rpm error: Failed dependencies: libpq.so.5()(64bit) is needed by pg_rman-1.3.6-1.pg10.rhel7.x86_64 postgresql10-libs is needed by pg_rman-1.3.6-1.pg10.rhel7.x86_64
安装pg相关源
[root@localhost tmp]# rpm -ivh pgdg-redhat10-10-2.noarch.rpm warning: pgdg-redhat10-10-2.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY Preparing... ################################# [100%] Updating / installing... 1:pgdg-redhat10-10-2 ################################# [100%] [root@localhost yum.repos.d]# pwd /etc/yum.repos.d [root@localhost yum.repos.d]# more pgdg-10-redhat.repo [pgdg10] name=PostgreSQL 10 $releasever - $basearch baseurl=https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-$releasever-$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10 [pgdg10-source] name=PostgreSQL 10 $releasever - $basearch - Source failovermethod=priority baseurl=https://download.postgresql.org/pub/repos/yum/srpms/10/redhat/rhel-$releasever-$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10 [pgdg10-updates-testing] name=PostgreSQL 10 $releasever - $basearch baseurl=https://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-$releasever-$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10 [pgdg10-source-updates-testing] name=PostgreSQL 10 $releasever - $basearch - Source failovermethod=priority baseurl=https://download.postgresql.org/pub/repos/yum/srpms/testing/10/redhat/rhel-$releasever-$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10
安装postgresql10-libs包
[root@localhost tmp]# yum install postgresql10-libs Loaded plugins: langpacks, ulninfo pgdg10 | 4.1 kB 00:00:00 (1/2): pgdg10/7Server/x86_64/group_gz | 245 B 00:00:01 (2/2): pgdg10/7Server/x86_64/primary_db | 162 kB 00:00:13 Resolving Dependencies --> Running transaction check ---> Package postgresql10-libs.x86_64 0:10.4-1PGDG.rhel7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================== Package Arch Version Repository Size ========================================================================== Installing: postgresql10-libs x86_64 10.4-1PGDG.rhel7 pgdg10 354 k Transaction Summary ========================================================================== Install 1 Package Total download size: 354 k Installed size: 1.3 M Is this ok [y/d/N]: y Downloading packages: postgresql10-libs-10.4-1PGDG.rhel7.x86_64.rpm | 354 kB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : postgresql10-libs-10.4-1PGDG.rhel7.x86_64 1/1 Verifying : postgresql10-libs-10.4-1PGDG.rhel7.x86_64 1/1 Installed: postgresql10-libs.x86_64 0:10.4-1PGDG.rhel7 Complete!
安装pg_rman
[root@localhost tmp]# rpm -ivh pg_rman-1.3.6-1.pg10.rhel7.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:pg_rman-1.3.6-1.pg10.rhel7 ################################# [100%]
查找默认pg_rman安装路径
[root@localhost bin]# find / -name "pg_rman" /usr/pgsql-10/bin/pg_rman [root@localhost bin]# cd /usr/pgsql-10/bin [root@localhost bin]# ls pg_rman
迁移到pg安装目录中
[root@localhost bin]# mv pg_rman /opt/PostgreSQL/10/bin
pg_rman命令测试
[root@localhost bin]# 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 detail [DATE] pg_rman OPTION validate [DATE] pg_rman OPTION delete DATE pg_rman OPTION purge 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 -v, --verbose show what detail messages -P, --progress show progress of processed files 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 -F, --full-backup-on-error switch to full backup mode if pg_rman cannot find validate full backup on current timeline NOTE: this option is only used in --backup-mode=incremental or archive. --keep-data-generations=NUM keep NUM generations of full data backup --keep-data-days=NUM keep enough data backup to recover to N days ago --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 --standby-host=HOSTNAME standby host when taking backup from standby --standby-port=PORT standby port when taking backup from standby 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 --hard-copy copying archivelog not symbolic link Catalog options: -a, --show-all show deleted backup too Delete options: -f, --force forcibly delete backup older than given DATE 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 show any INFO or DEBUG messages --debug show DEBUG messages --help show this help, then exit --version output version information, then exit Read the website for details. <http://github.com/ossc-db/pg_rman> Report bugs to <http://github.com/ossc-db/pg_rman/issues>.