Ошибка резервного копирования pgbackrest в pg_stop_backup () из-за превышения времени ожидания 1800000 мс - PullRequest
0 голосов
/ 16 марта 2020

У меня есть база данных postgres9.6 едва ли один ГБ, если данные. Попытка установить резервное копирование базы pgbackrest на S3. Сделал установку и необходимую настройку. Способен создать строфу и проверил ее.

Но когда я начал полное резервное копирование, я получил ошибку в момент «выполнить неисключительный pg_stop_backup () и дождаться архивирования всех сегментов WAL».

Время ожидания истекло после 1800000 мс.

Ниже приведена ошибка:

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, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, 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, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, 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:     postgres/client::pgClientQuery: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, 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:58:55.010 P00  DEBUG:     common/exit::exitSafe: (result: 0, error: true, signalType: 0)
ERROR: [057]: 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)' 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, sessions 31, 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/
...