pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation abouts
The user which you're performing your pg_dump
as doesn't have permissions on the public schema.
Add permissions if allowed:
GRANT USAGE ON SCHEMA public TO <user>;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>;
Not able to pg_dump due to permission, despite having permissions
You need the USAGE
privilege on schema londiste
and the SELECT
privilege on londiste.provider_seq
.
pg_dump a db that doesn't have root user
This:
pg_dump lhhsweb > lhhs.sql
should be specified as at minimum as:
pg_dump -U <db_owner or superuser> -d lhhsweb -f lhhs.sql
Where <db_owner or superuser> is the Postgres user that owns the database or is a superuser. In any case a user(role) that has sufficient privileges to dump the entire database.
The reason you are getting the error is that in the absence of -U
(user) the user name used is that of the system user the command is being run as, per Parameter Key words.:
user
PostgreSQL user name to connect as. Defaults to be the same as the operating system name of the user running the application.
I suggest spending some time at the above link to see what the other key words mean also. It will make things clearer and prevent issues down the road.
In conclusion, in modern versions of Postgres the term user is an alias for role, with the convention that a role that can login can also be referred to as a user. Postgres has its own set of users internal to the database that are independent of the OS system users. When you are extracting information from the database you need to be using those users. In particular a user that has the necessary privileges.
permission denied for relation django_migrations
Sounds like it's down to permissions, so make sure you at least have USAGE
for relevant schema and the SELECT
privilege for the table.
Check out this answer for much greater detail.
Related Topics
How to Understand the #Dup and #Clone Operate on Objects Which Referencing Other Objects
Rails: Chartkick Cummulative User Graph
Flatten a Ruby Array Without Using Built-In 'Flatten' Method
Ruby on Rails: Create Confirmation View Before Creating the Object
Can You Have Multiple Versions of a Gem in a Gemfile
Failing to Enable User-Env-Compile on Heroku
Rails Not Working for New Project. Showingerror " Superclass Mismatch for Class Cipher (Typeerror)"
Array#Uniq with Block Equivalent in Ruby 1.8.7
Can Someone Explain the Following Code to Me
Gitlab: Invocation of Gitlab-Shell
Why Do Numeric String Comparisons Give Unexpected Results
Generating Devise Controllers - Rails Devise
How to Add Iedriverserver to Path
How to Interpolate a Variable in a Ruby Regex
Ruby Open-Uri Can't Open Url (M1 MAC)