标签云
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)
- 操作系统 (100)
- 数据库 (1,597)
- DB2 (22)
- MySQL (70)
- Oracle (1,463)
- Data Guard (49)
- EXADATA (7)
- GoldenGate (21)
- ORA-xxxxx (158)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (13)
- ORACLE 21C (3)
- Oracle ASM (65)
- Oracle Bug (7)
- Oracle RAC (47)
- Oracle 安全 (6)
- Oracle 开发 (27)
- Oracle 监听 (27)
- Oracle备份恢复 (530)
- Oracle安装升级 (84)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (75)
- PostgreSQL (17)
- PostgreSQL恢复 (5)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (36)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (19)
-
最近发表
- Oracle 19c/21c最新patch信息-202404
- PostgreSQL恢复系列:pg_filedump批量处理
- PostgreSQL部分主要字典信息
- PostgreSQL恢复系列:pg_filedump恢复字典构造
- PostgreSQL 16 源码安装
- ORA-00742 ORA-00312 恢复
- 数据库open成功后报ORA-00353 ORA-00354错误引起的一系列问题(本质ntfs文件系统异常)
- ORA-600 ktsiseginfo1故障
- ORA-00600: internal error code, arguments: [16703], [1403], [4] 原因
- 最近遇到几起ORA-600 16703故障(tab$被清空),请引起重视
- ORA-600 2662快速恢复之Patch scn工具
- TNS-12518: TNS:listener could not hand off client connection
- ora.storage无法启动报ORA-12514故障处理
- 断电引起文件scn异常数据库恢复
- ORA-16188: LOG_ARCHIVE_CONFIG settings inconsistent with previously started instance
- .[hudsonL@cock.li].mkp勒索加密数据库完美恢复
- 模拟带库实现rman远程备份
- 又一例:ORA-600 kclchkblk_4和2662故障
- Oracle误删除数据文件恢复
- Oracle 19C 备库DML重定向—DML Redirection
标签归档: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>.