首页 > 其他分享 >pg_basebackup恢复:unrecognized configuration parameter "restore_command"

pg_basebackup恢复:unrecognized configuration parameter "restore_command"

时间:2022-12-30 15:45:55浏览次数:42  
标签:restore postgresql file unrecognized command pg conf configuration basebackup

问题描述:2022年最后一个工作日,时间过的真快,一晃又一年过去了,祝愿看到的各位元旦快乐。

使用pg_basebackup进行pg的备份恢复,在恢复的过程中,配置文件添加恢复的参数,一直启动报错。

在postgre.conf和postgres.auto.conf中都添加尝试了。类似下列报错,都启动失败

PG版本:pg_ctl (PostgreSQL) 10.1

LOG:  unrecognized configuration parameter "restore_command" in file "/var/lib/postgresql/9.6/main/postgresql.auto.conf" line 5
LOG:  unrecognized configuration parameter "recovery_target_name" in file "/var/lib/postgresql/9.6/main/postgresql.auto.conf" line 6
FATAL:  configuration file "/var/lib/postgresql/9.6/main/postgresql.auto.conf" contains errors
$ pg_ctl -D /u01/app/pgsql/data start   
waiting for server to start....2022-06-01 17:42:41.472 GMT [7645] LOG:  unrecognized configuration parameter "restore_command" in file "/u01/app/pgsql/11/data/postgresql.conf" line 64
2022-06-01 17:42:41.472 GMT [7645] LOG:  unrecognized configuration parameter "recovery_target_timeline" in file "/u01/app/pgsql/data/postgresql.conf" line 65
2022-06-01 17:42:41.472 GMT [7645] FATAL:  configuration file "/u01/app/pgsql/11/data/postgresql.conf" contains errors
 stopped waiting

 

 

 

 

 

 

后来更换了pg版本,换成(PostgreSQL) 13.6,跟10的版本区别就是13的postgres.conf文件中可以找到相关的恢复参数,但是被注释掉了,10的postgres.conf文件中就没有相关的参数,不支持相关的恢复参数。

而且postgres.auto.conf上边系统给到的注释,就是不要手动去编辑这个文件,他会在alter system command命令中生成配置。

但是很多恢复文档都是直接去修改这个文件,没有测试,不知道原理是什么。

# vim postgres.conf

基于时间线恢复

 

 

基于备份点恢复

 

基于时间点进行恢复

 

标签:restore,postgresql,file,unrecognized,command,pg,conf,configuration,basebackup
From: https://www.cnblogs.com/houzhiheng/p/17015025.html

相关文章

  • Linux报错:pip: command not found
    问题描述CentOS7下,执行pip提示不存在#系统cat/etc/redhat-releaseCentOSLinuxrelease7.9.2009(Core)#检查python已存在$python-VPython2.7.5#检查pip,......
  • IDEA 出现问题:Error running,Command line is too long. Shorten command line解决方案
    问题描述Errorrunning‘MallTest.testRun’:Commandlineistoolong.ShortencommandlineforMallTest.testRun.错误运行的测试。命令行太长。缩短命令行。解决......
  • DVWA之Command Execution篇
    CommandExecution靶机基本情况Metasploitable2中的DVWALevel:Low构造语句:;nc-e/bin/bash192.168.176.1285555其中192.168.176.128为KaliLinuxIP地址可以......
  • python:You should consider upgrading via the 'python -m pip install --upgrade pi
    环境: MicrosoftWindows10家庭版 10.0.19044  python3.7.4今天使用命令"pipinstallpyinstaller"准备安装pyinstaller时报错(如下图):Youareusingpipversion......
  • I found no \bibdata command
    这是并不是latex环境缺失什么的,而是要查看.tex中的参考文献部分。常见的参考文献部分有如下两种。分别分析每种方式是否存在对应的问题即可。参考文献方式1\bibliograp......
  • SqlCommand.ExecuteNonQuery 方法
    一、ExecuteNonQuery方法是什么?SqlCommand的一个类,用于包含update、insert、delete、select的Transact-sql语句中来修改数据库中的数据,并返回结果。 二、返回的结果是什......
  • SQL Command Types All In One
    SQLCommandTypesAllInOne(......
  • [CTF] 攻防世界-command_execution
    题目:小宁写了个ping功能,但没有写waf,X老师告诉她这是非常危险的,你知道为什么吗。个人WP(官方的不好或者不全)随便输入个东西试试是ping的命令,加上题目说没有waf,猜测......
  • Linux xattr shell command All In One
    LinuxxattrshellcommandAllInOnemacOS$manxattr>xattr.mdmanxattrXATTR(1)GeneralCommandsManualXAT......
  • dremio CommandPool简单说明
    CommandPool实际上是一个线程池的处理,官方实现了好几种线程池主要作用限制并行请求以以及job的运行定义优先级任务特点任务基于优先级以及提交时间进行自然排序当线程空闲......