0

我一直在尝试从源(https://access.crunchydata.com/documentation/pgbackrest/2.00/pdf/backrest.pdf)在 linux(ubuntu)上的 postgres 中增量加载数据,而我正在尝试创建一个节我我收到以下错误。

由于我是 Linux 平台的新手,所以花了 2 天以上的时间,我无法解决它!

sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stanza-create
2019-10-03 16:16:22.730 P00   INFO: stanza-create command begin 2.16: --log-level-console=info --pg1-path=/var/lib/postgresql/11/demo --repo1-path=/var/lib/pgbackrest --stanza=demo

ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/demo-archive.lock': Permission denied
       HINT: does the user running pgBackRest have permissions on the '/tmp/pgbackrest/demo-archive.lock' file?
2019-10-03 16:16:22.730 P00   INFO: stanza-create command end: aborted with exception [050]

ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/demo-archive.lock': Permission denied
       HINT: does the user running pgBackRest have permissions on the '/tmp/pgbackrest/demo-archive.lock' file?
2019-10-03 16:16:22.730 P00   INFO: stanza-create command end: aborted with exception [050]

出现这种情况的原因是什么以及如何解决?

4

1 回答 1

2

我遇到了同样的问题,只需删除临时文件夹及其文件即可解决

sudo rm -r pgbackrest/

它对我有用。另一种可能的解决方案是删除临时文件夹和节并重新创建节。

于 2020-05-25T07:45:51.820 回答