Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oleglukashev/238b0c5ec08fec5e59a9673de1247abc to your computer and use it in GitHub Desktop.
Save oleglukashev/238b0c5ec08fec5e59a9673de1247abc to your computer and use it in GitHub Desktop.
pg_backrest
develop@radiokey:/etc/pgbackrest$ sudo -u postgres pgbackrest --stanza=main stanza-create --log-level-console=debug
2023-04-04 16:46:29.240 P00 INFO: stanza-create command begin 2.18: --log-level-console=debug --log-level-file=detail --pg1-path=/var/lib/postgresql/10/main --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/ --repo1-s3-bucket=7da688ab-radiokey --repo1-s3-endpoint=s3.timeweb.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=ru-1 --repo1-type=s3 --stanza=main
2023-04-04 16:46:29.240 P00 DEBUG: common/lock::lockAcquire: (lockPath: {"/tmp/pgbackrest"}, stanza: {"main"}, lockType: 2, lockTimeout: 0, failOnNoLock: true)
2023-04-04 16:46:29.240 P00 DEBUG: common/lock::lockAcquire: => true
2023-04-04 16:46:29.240 P00 DEBUG: config/load::cfgLoad: => void
2023-04-04 16:46:29.240 P00 DEBUG: command/stanza/create::cmdStanzaCreate: (void)
2023-04-04 16:46:29.240 P00 DEBUG: command/control/common::lockStopTest: (void)
2023-04-04 16:46:29.240 P00 DEBUG: storage/storage::storageExists: (this: {type: posix, path: {"/"}, write: false}, pathExp: {"/tmp/pgbackrest/main.stop"}, param.timeout: 0)
2023-04-04 16:46:29.240 P00 DEBUG: storage/storage::storageExists: => false
2023-04-04 16:46:29.240 P00 DEBUG: storage/storage::storageExists: (this: {type: posix, path: {"/"}, write: false}, pathExp: {"/tmp/pgbackrest/all.stop"}, param.timeout: 0)
2023-04-04 16:46:29.240 P00 DEBUG: storage/storage::storageExists: => false
2023-04-04 16:46:29.240 P00 DEBUG: command/control/common::lockStopTest: => void
2023-04-04 16:46:29.240 P00 DEBUG: storage/s3/storage::storageS3New: (path: {"/"}, write: false, pathExpressionFunction: (function *), bucket: {"7da688ab-radiokey"}, endPoint: {"s3.timeweb.com"}, region: {"ru-1"}, partSize: 5242880, host: null, port: 443, timeout: 60000, verifyPeer: true, caFile: null, caPath: null)
2023-04-04 16:46:29.240 P00 DEBUG: common/io/http/cache::httpClientCacheNew: (host: {"7da688ab-radiokey.s3.timeweb.com"}, port: 443, timeout: 60000, verifyPeer: true, caFile: null, caPath: null)
2023-04-04 16:46:29.240 P00 DEBUG: common/io/http/cache::httpClientCacheNew: => {HttpClientCache}
2023-04-04 16:46:29.240 P00 DEBUG: storage/s3/storage::storageS3New: => {type: s3, path: {"/"}, write: false}
2023-04-04 16:46:29.240 P00 DEBUG: storage/s3/storage::storageS3New: (path: {"/"}, write: true, pathExpressionFunction: (function *), bucket: {"7da688ab-radiokey"}, endPoint: {"s3.timeweb.com"}, region: {"ru-1"}, partSize: 5242880, host: null, port: 443, timeout: 60000, verifyPeer: true, caFile: null, caPath: null)
2023-04-04 16:46:29.240 P00 DEBUG: common/io/http/cache::httpClientCacheNew: (host: {"7da688ab-radiokey.s3.timeweb.com"}, port: 443, timeout: 60000, verifyPeer: true, caFile: null, caPath: null)
2023-04-04 16:46:29.240 P00 DEBUG: common/io/http/cache::httpClientCacheNew: => {HttpClientCache}
2023-04-04 16:46:29.240 P00 DEBUG: storage/s3/storage::storageS3New: => {type: s3, path: {"/"}, write: true}
2023-04-04 16:46:29.240 P00 DEBUG: db/helper::dbGet: (primaryOnly: false, primaryRequired: true)
2023-04-04 16:46:29.240 P00 DEBUG: db/helper::dbGetId: (pgId: 1)
2023-04-04 16:46:29.240 P00 DEBUG: protocol/helper::pgIsLocal: (hostId: 1)
2023-04-04 16:46:29.240 P00 DEBUG: protocol/helper::pgIsLocal: => true
2023-04-04 16:46:29.240 P00 DEBUG: postgres/client::pgClientNew: (host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout: 1800000)
2023-04-04 16:46:29.240 P00 DEBUG: postgres/client::pgClientNew: => {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}
2023-04-04 16:46:29.240 P00 DEBUG: db/db::dbNew: (client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null, applicationName: {"pgBackRest [stanza-create]"})
2023-04-04 16:46:29.240 P00 DEBUG: db/db::dbNew: => {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}
2023-04-04 16:46:29.240 P00 DEBUG: db/helper::dbGetId: => {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}
2023-04-04 16:46:29.240 P00 DEBUG: db/db::dbOpen: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null})
2023-04-04 16:46:29.240 P00 DEBUG: postgres/client::pgClientOpen: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000})
2023-04-04 16:46:29.242 P00 DEBUG: postgres/client::pgClientOpen: => {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}
2023-04-04 16:46:29.242 P00 DEBUG: db/db::dbExec: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, command: {"set search_path = 'pg_catalog'"})
2023-04-04 16:46:29.242 P00 DEBUG: db/db::dbQuery: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"set search_path = 'pg_catalog'"})
2023-04-04 16:46:29.242 P00 DEBUG: postgres/client::pgClientQuery: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, query: {"set search_path = 'pg_catalog'"})
2023-04-04 16:46:29.342 P00 DEBUG: postgres/client::pgClientQuery: => null
2023-04-04 16:46:29.342 P00 DEBUG: db/db::dbQuery: => null
2023-04-04 16:46:29.342 P00 DEBUG: db/db::dbExec: => void
2023-04-04 16:46:29.342 P00 DEBUG: db/db::dbQueryRow: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"select (select setting from pg_catalog.pg_settings where name = 'server_version_num')::int4, (select setting from pg_catalog.pg_settings where name = 'data_directory')::text"})
2023-04-04 16:46:29.343 P00 DEBUG: db/db::dbQuery: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"select (select setting from pg_catalog.pg_settings where name = 'server_version_num')::int4, (select setting from pg_catalog.pg_settings where name = 'data_directory')::text"})
2023-04-04 16:46:29.343 P00 DEBUG: postgres/client::pgClientQuery: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, query: {"select (select setting from pg_catalog.pg_settings where name = 'server_version_num')::int4, (select setting from pg_catalog.pg_settings where name = 'data_directory')::text"})
2023-04-04 16:46:29.443 P00 DEBUG: postgres/client::pgClientQuery: => {VariantList}
2023-04-04 16:46:29.443 P00 DEBUG: db/db::dbQuery: => {VariantList}
2023-04-04 16:46:29.443 P00 DEBUG: db/db::dbQueryRow: => {VariantList}
2023-04-04 16:46:29.443 P00 DEBUG: db/db::dbExec: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, command: {"set application_name = 'pgBackRest [stanza-create]'"})
2023-04-04 16:46:29.443 P00 DEBUG: db/db::dbQuery: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"set application_name = 'pgBackRest [stanza-create]'"})
2023-04-04 16:46:29.443 P00 DEBUG: postgres/client::pgClientQuery: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, query: {"set application_name = 'pgBackRest [stanza-create]'"})
2023-04-04 16:46:29.544 P00 DEBUG: postgres/client::pgClientQuery: => null
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbQuery: => null
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbExec: => void
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbOpen: => void
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbIsStandby: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null})
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbQueryColumn: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"select pg_catalog.pg_is_in_recovery()"})
2023-04-04 16:46:29.544 P00 DEBUG: db/db::dbQuery: (this: {client: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, remoteClient: null}, query: {"select pg_catalog.pg_is_in_recovery()"})
2023-04-04 16:46:29.544 P00 DEBUG: postgres/client::pgClientQuery: (this: {host: null, port: 5432, database: {"postgres"}, user: null, queryTimeout 1800000}, query: {"select pg_catalog.pg_is_in_recovery()"})
2023-04-04 16:46:29.645 P00 DEBUG: postgres/client::pgClientQuery: => {VariantList}
2023-04-04 16:46:29.645 P00 DEBUG: db/db::dbQuery: => {VariantList}
2023-04-04 16:46:29.645 P00 DEBUG: db/db::dbQueryColumn: => {false}
2023-04-04 16:46:29.645 P00 DEBUG: db/db::dbIsStandby: => false
2023-04-04 16:46:29.645 P00 DEBUG: db/helper::dbGet: => {DbGetResult}
2023-04-04 16:46:29.645 P00 DEBUG: protocol/helper::pgIsLocal: (hostId: 1)
2023-04-04 16:46:29.645 P00 DEBUG: protocol/helper::pgIsLocal: => true
2023-04-04 16:46:29.645 P00 DEBUG: storage/posix/storage::storagePosixNew: (path: {"/var/lib/postgresql/10/main"}, modeFile: 0640, modePath: 0750, write: false, pathExpressionFunction: null)
2023-04-04 16:46:29.645 P00 DEBUG: storage/posix/storage::storagePosixNewInternal: (type: {"posix"}, path: {"/var/lib/postgresql/10/main"}, modeFile: 0640, modePath: 0750, write: false, pathExpressionFunction: null, pathSync: true)
2023-04-04 16:46:29.645 P00 DEBUG: storage/posix/storage::storagePosixNewInternal: => {type: posix, path: {"/var/lib/postgresql/10/main"}, write: false}
2023-04-04 16:46:29.645 P00 DEBUG: storage/posix/storage::storagePosixNew: => {type: posix, path: {"/var/lib/postgresql/10/main"}, write: false}
2023-04-04 16:46:29.645 P00 DEBUG: postgres/interface::pgControlFromFile: (storage: {type: posix, path: {"/var/lib/postgresql/10/main"}, write: false}, pgPath: {"/var/lib/postgresql/10/main"})
2023-04-04 16:46:29.645 P00 DEBUG: storage/storage::storageNewRead: (this: {type: posix, path: {"/var/lib/postgresql/10/main"}, write: false}, fileExp: {"/var/lib/postgresql/10/main/global/pg_control"}, param.ignoreMissing: false, param.compressible: false)
2023-04-04 16:46:29.645 P00 DEBUG: storage/storage::storageNewRead: => {type: posix, name: {"/var/lib/postgresql/10/main/global/pg_control"}, ignoreMissing: false}
2023-04-04 16:46:29.645 P00 DEBUG: storage/storage::storageGet: (file: {type: posix, name: {"/var/lib/postgresql/10/main/global/pg_control"}, ignoreMissing: false}, param.exactSize: 512)
2023-04-04 16:46:29.645 P00 DEBUG: storage/storage::storageGet: => {used: 512, size: 512, limit: <off>}
2023-04-04 16:46:29.645 P00 DEBUG: postgres/interface::pgControlFromFile: => {version: 100000, systemId: 7194363106692120895, walSegmentSize: 16777216, pageChecksum: false}
2023-04-04 16:46:29.645 P00 DEBUG: storage/storage::storageExists: (this: {type: s3, path: {"/"}, write: false}, pathExp: {"<REPO:ARCHIVE>/archive.info"}, param.timeout: 0)
2023-04-04 16:46:29.645 P00 DEBUG: storage/s3/storage::storageS3Exists: (this: {StorageS3}, file: {"/archive/main/archive.info"})
2023-04-04 16:46:29.645 P00 DEBUG: storage/s3/storage::storageS3Request: (this: {StorageS3}, verb: {"HEAD"}, uri: {"/archive/main/archive.info"}, query: null, body: null, returnContent: true, allowMissing: true)
2023-04-04 16:46:29.650 P00 DEBUG: common/io/http/client::httpClientRequest: (this: {HttpClient}, verb: {"HEAD"}, uri: {"/archive/main/archive.info"}, query: null, requestHeader: {authorization: <redacted>, content-length: '0', host: '7da688ab-radiokey.s3.timeweb.com', x-amz-content-sha256: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', x-amz-date: '20230404T134629Z'}, body: null, returnContent: true)
2023-04-04 16:46:29.855 P00 DEBUG: common/io/http/client::httpClientRequest: => null
2023-04-04 16:46:29.855 P00 DEBUG: common/exit::exitSafe: (result: 0, error: true, signalType: 0)
ERROR: [039]: S3 request failed with 403: Forbidden
*** URI/Query ***:
/archive/main/archive.info
*** Request Headers ***:
authorization: <redacted>
content-length: 0
host: 7da688ab-radiokey.s3.timeweb.com
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: <redacted>
*** Response Headers ***:
access-control-allow-headers: *
access-control-allow-methods: *
access-control-allow-origin: *
connection: close
content-length: 477
content-type: text/xml; charset=utf-8
date: Tue, 04 Apr 2023 13:46:29 GMT
server: nginx
x-amz-request-id: cd97f5d2-efa4-4ef7-9022-d53c57355921
x-krakend: Version 1.4.1
x-krakend-completed: false
2023-04-04 16:46:29.856 P00 DETAIL: tls statistics: objects 1, sessions 1, requests 1, retries 0
2023-04-04 16:46:29.856 P00 INFO: http statistics: objects 1, sessions 1, requests 1, retries 0, closes 1
2023-04-04 16:46:29.856 P00 INFO: stanza-create command end: aborted with exception [039]
2023-04-04 16:46:29.856 P00 DEBUG: common/lock::lockRelease: (failOnNoLock: false)
2023-04-04 16:46:29.856 P00 DEBUG: common/lock::lockRelease: => true
2023-04-04 16:46:29.856 P00 DEBUG: common/exit::exitSafe: => 39
2023-04-04 16:46:29.856 P00 DEBUG: main::main: => 39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment