Search code examples
postgresql-9.6pgadmin-4

pgadmin 4: Exporting .tar file


I am trying to use pgAdmin 4 on my personal laptop (Windows operating system with PostgreSQL 9.6) to export a database as a .tar file. I had issues importing csv through the Import/Export tool as well, and could only import successfully when doing the following:

COPY public.build_info FROM 'C:\time_table.csv' CSV HEADER;

I have read a few questions that resort to backing up a database through the command line, but I am hoping to complete this within pgAdmin4.

My current steps are:

  1. right click my database (in this case Housing_DB)

  2. Choose my directory to save (same place the csv files were imported from)

  3. Add additional information (encoding, file type, name, etc.)

I get an error immediately connected to Permissions, but have struggled to determine how to fix this issue:

PgAdmin4 Error

Does anybody know how I could go through and provide permissions to be able to back up this database? I have looked at the documentation pertaining to backup/restore but did not see anything covering permissions (https://www.pgadmin.org/docs4/1.x/backup_dialog.html).


Solution

  • It looks like your C:\ is protected by administrator account which can't be written by user postgres. Can you try again with locations like your 'Desktop' or 'Temp' folder.