如果有数据,我的postgres9.6数据库几乎没有1 GB。尝试在S3上设置pgbackrest基础备份。完成了安装和所需的配置。 能够创建节并检查它。
但是,当我开始完全备份时,在“执行非独占pg_stop_backup()并等待所有WAL段归档”时出现错误。
它在1800000ms之后超时。
以下是错误:
2020-03-16 17:28:54.977 P00 INFO: full backup size = 1.5GB
2020-03-16 17:28:54.977 P00 DEBUG: command/backup/backup::backupProcess: => void
2020-03-16 17:28:54.977 P00 DEBUG: command/backup/backup::backupStop: (backupData: {BackupData},manifest: {Manifest})
2020-03-16 17:28:54.977 P00 INFO: execute non-exclusive pg_stop_backup() and wait for all WAL segments to archive
2020-03-16 17:28:54.977 P00 DEBUG: db/db::dbBackupStop: (this: {client: {host: null,port: 5432,database: {"postgres"},user: null,queryTimeout 1800000},remoteclient: null})
2020-03-16 17:28:54.977 P00 DEBUG: db/db::dbQueryRow: (this: {client: {host: null,remoteclient: null},query: {"select lsn::text as lsn,pg_catalog.pg_xlogfile_name(lsn)::text as wal_segment_name,labelfile::text as backuplabel_file,spcmapfile::text as tablespacemap_file
from pg_catalog.pg_stop_backup(false)"})
2020-03-16 17:28:54.977 P00 DEBUG: db/db::dbQuery: (this: {client: {host: null,spcmapfile::text as tablespacemap_file
from pg_catalog.pg_stop_backup(false)"})
2020-03-16 17:28:54.977 P00 DEBUG: postgres/client::pgClientQuery: (this: {host: null,spcmapfile::text as tablespacemap_file
from pg_catalog.pg_stop_backup(false)"})
2020-03-16 17:58:55.010 P00 DEBUG: common/exit::exitSafe: (result: 0,error: true,signalType: 0)
ERROR: [057]: query 'select lsn::text as lsn,spcmapfile::text as tablespacemap_file
from pg_catalog.pg_stop_backup(false)' timed out after 1800000ms
2020-03-16 17:58:55.110 P00 DetaIL: tls statistics: objects 2,sessions 31,requests 2285,retries 0
2020-03-16 17:58:55.110 P00 INFO: http statistics: objects 2,requests 2278,retries 7,closes 22
2020-03-16 17:58:55.110 P00 INFO: backup command end: aborted with exception [057]
2020-03-16 17:58:55.110 P00 DEBUG: common/lock::lockRelease: (failOnNoLock: false)
2020-03-16 17:58:55.110 P00 DEBUG: common/lock::lockRelease: => true
2020-03-16 17:58:55.110 P00 DEBUG: common/exit::exitSafe: => 57
2020-03-16 17:58:55.110 P00 DEBUG: main::main: => 57
以下是pgbackrest配置:
[global]
archive-async = y
repo-path = /pgBackup/*******/central/shard-1
repo1-retention-full = 5
repo1-s3-bucket = *******************
repo1-s3-endpoint = s3.us-west-2.amazonaws.com
repo1-s3-key = ******************
repo1-s3-key-secret = ******************
repo1-s3-region = us-west-2
repo1-type = s3
[global:archive-get]
process-max = 2
[global:archive-push]
process-max = 2
[backup]
db1-path = /var/lib/postgresql/9.6/main/