Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
93 views

Export domain in postgres

I want to backup some tables of an postgres db in another empty db. To do this I use pg_dump with the -t option, but when I restore it I get an error due to a missing domain. The only solution I found ...
Antonin's user avatar
  • 67
2 votes
2 answers
418 views

Problems encountered in recovering three tables from a dump file

I'm trying to restore tables from a dump file. It's illustrated by a footnote in the paper "VCCFinder-Finding Potential Vulnerabilities in Open-Source Projects to Assist Code Audits", that ...
Wunyje's user avatar
  • 21
5 votes
2 answers
25k views

How to create an sql dump file of a Postgres database using psql

I currently have created a database via Supabase, which uses the Postgres database. After doing so, I then downloaded Postgres on my computer, which gave me the psql command line script for use to ...
Yan Xu's user avatar
  • 77
1 vote
1 answer
898 views

Encoding issue pg_dump [PostgreSQL]

I have to migrate a DB from one server to another. Both server are using PostgreSQL 9.6.24. I'm using the pg_dump tool to dump my DB in plain sql , with this command : pg_dump -h myHost -p myPort -U ...
Riddle Tom's user avatar
0 votes
0 answers
148 views

Use fifo file for pg_restore

With a colleague, we have to transfer a database from an old server to a new machine. So we use pg_dump / pg_restore The database is large (~ 500GB). We therefore made the choice to use FIFO files to ...
IFE's user avatar
  • 41
0 votes
1 answer
779 views

How to pg_dump only the INSERT statements without SET / SELECTS / -- Comments in POSTGRESQL?

My bash code to dump only specific lines of a table: acc_db mydb -c "create table export_table as $1" mypg_dump -d mydb -a -t export_table --data-only --column-inserts >> /tmp/export_data.sql ...
Lanodisoft's user avatar
12 votes
1 answer
12k views

postgres dump with inserts but without copy actions

I am trying to dump my database. For reasons I can't go into detail here, I am unable to use the "Copy" function. This means that the insert statements have to be "pure" insert. However, I am not ...
Marc Rasmussen's user avatar
0 votes
0 answers
2k views

pg_restore not working for .dump file

I'm trying to restore a database to a new environment and pg_dump/pg_restore seems like the best way for me to do that. I've run the pg_dump command with the following code which has produced my dump ...
David Parsonson's user avatar
9 votes
1 answer
24k views

A lot of "invalid command \N" when I try to restore PostgreSQL dump

I made a backup of a database on my mac and tried to restore it on a computer with ubuntu. When I execute psql -U uname -d dbname -f ~/dump_from_mac I have a lot of error messages like "invalid ...
Andrey's user avatar
  • 320
1 vote
1 answer
1k views

How to dump data owned by postgres in case of lack of privileges for writing

I have DB owned by postgres, and I need to dump it, but postgres user does not have rights to write. So it boils down to login to DB as postgres but under different user in OS. How can I do that? I ...
Gill Bates's user avatar
  • 15.5k
53 votes
9 answers
71k views

pg_dump: too many command line arguments

what is wrong with this command: pg_dump -U postgres -W admin --disable-triggers -a -t employees -f D:\ddd.txt postgres This is giving error of too many command-line arguments
Bhargav Gor's user avatar
3 votes
1 answer
3k views

Can I selectively create a backup of Postgres database, with only certian tables?

Can I programatically(or whichever way works fine) create the backup of a database, with only the tables I want? I have around 100 tables in my database and I want only 10 tables backup(ofcourse all ...
Nanda Kishore's user avatar