简体   繁体   中英

ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/demo-archive.lock': Permission denied

I have been trying to load data incrementally in postgres on linux(ubuntu) from the source ( https://access.crunchydata.com/documentation/pgbackrest/2.00/pdf/backrest.pdf ) while I am trying to create a stanza I am getting the following error.

As I am new to the Linux platform it has been taken more then 2 days and I couldn't solve it!

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]

What is the reason why this is showing and how to solve it?

I faced the same issue and solved by just deleting the temp folder and its files

sudo rm -r pgbackrest/

It worked for me. Another possible solution is to delete the temp folder and stanza & re-create the stanza.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM