AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 261253
Accepted
rawmain
rawmain
Asked: 2020-03-05 20:11:02 +0800 CST2020-03-05 20:11:02 +0800 CST 2020-03-05 20:11:02 +0800 CST

为什么 Barman 的备份数据库无法结束(待定)?

  • 772

做过操作:

barman cron
barman receive-wal --create-slot pg
barman receive-wal pg
barman switch-wal --force --archive pg

然后运行检查和备份命令:

-bash-4.2$ barman check pg
Server pg:
    PostgreSQL: OK
    is_superuser: OK
    PostgreSQL streaming: OK
    wal_level: OK
    replication slot: OK
    directories: OK
    retention policy settings: OK
    backup maximum age: OK (no last_backup_maximum_age provided)
    compression settings: OK
    failed backups: OK (there are 0 failed backups)
    minimum redundancy requirements: OK (have 0 backups, expected at least 0)
    pg_basebackup: OK
    pg_basebackup compatible: OK
    pg_basebackup supports tablespaces mapping: OK
    systemid coherence: OK (no system Id stored on disk)
    pg_receivexlog: OK
    pg_receivexlog compatible: OK
    receive-wal running: OK
    archive_mode: OK
    archive_command: OK
    archiver errors: OK
-bash-4.2$ barman backup pg
Starting backup using postgres method for server pg in /var/lib/barman/pg/base/20200305T124531
Backup start at LSN: 0/5100A7B8 (000000010000000000000051, 0000A7B8)
Starting backup copy via pg_basebackup for 20200305T124531
(pending)

很长一段时间后它无法完成。检查/var/lib/barman/pg/base/20200305T124531/路径:

  • 备份信息
  • 数据

在data中,似乎已经复制了来自 pg 服务器的数据。请参阅中的内容backup.info:

backup_label=None
begin_offset=42936
begin_time=2020-03-05 12:45:31.020705+09:00
begin_wal=000000010000000000000051
begin_xlog=0/5100A7B8
config_file=/var/lib/pgsql/10/data/postgresql.conf
copy_stats=None
deduplicated_size=None
end_offset=None
end_time=None
end_wal=None
end_xlog=None
error=None
hba_file=/var/lib/pgsql/10/data/pg_hba.conf
ident_file=/var/lib/pgsql/10/data/pg_ident.conf
included_files=None
mode=postgres
pgdata=/var/lib/pgsql/10/data
server_name=pg
size=None
status=STARTED
systemid=6795775088862271947
tablespaces=None
timeline=1
version=100012
xlog_segment_size=16777216

检查过程,得到:

barman    5661  0.0  0.2 258560 19204 ?        Ss   12:45   0:00 /usr/bin/python2 /bin/barman -c /etc/barman.conf -q receive-wal pg
barman    5671  0.0  0.0 176384  3416 ?        S    12:45   0:00 /usr/pgsql-10/bin/pg_receivewal --dbname=dbname=replication host=pg options=-cdatestyle=iso replication=true user=streaming_barman application_name=barman_receive_wal --verbose --no-loop --no-password --directory=/var/lib/barman/pg/streaming --slot=barman
postgres  5675  0.0  0.0 397052  3844 ?        Ss   12:45   0:00 postgres: wal sender process streaming_barman 127.0.0.1(41570) streaming 0/534365C8
barman    5745  0.0  0.2 258564 19080 pts/0    S+   12:45   0:00 /usr/bin/python2 /bin/barman backup pg
barman    5751  0.0  0.0 176132  3316 pts/0    S+   12:45   0:00 /bin/pg_basebackup --dbname=dbname=replication host=pg options=-cdatestyle=iso replication=true user=streaming_barman application_name=barman_streaming_backup -v --no-password --pgdata=/var/lib/barman/pg/base/20200305T124531/data --no-slot --wal-method=none
postgres  5752  0.0  0.0 396724  7980 ?        Ss   12:45   0:00 postgres: wal sender process streaming_barman 127.0.0.1(41618) sending backup "pg_basebackup base backup"

为什么不能完成?status=STARTED未更新完成状态。

postgresql barman
  • 1 1 个回答
  • 873 Views

1 个回答

  • Voted
  1. Best Answer
    rawmain
    2020-03-05T20:56:19+08:002020-03-05T20:56:19+08:00

    原因是我在第一次备份操作后进行了恢复。然后巴曼在文件中设置了一个字符串#BARMAN#提前archive_command = 'barman-wal-archive backup pg %p'命令postgresql.conf!

    所以第二次备份时不能调用该命令。

    删除字符串,它的工作原理。

    旨在恢复后不允许用户archive_command再次使用的设计?

    • 0

相关问题

  • 我可以在使用数据库后激活 PITR 吗?

  • 运行时间偏移延迟复制的最佳实践

  • 存储过程可以防止 SQL 注入吗?

  • PostgreSQL 中 UniProt 的生物序列

  • PostgreSQL 9.0 Replication 和 Slony-I 有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve