Questions tagged [pg-dump]

pg_dump is a utility for backing up a PostgreSQL database.

656 questions
0
votes
1 answer

extract data (insert command) from the pg dump file

I have a postgres dump file which is exported from Heroku app. Is there any way to export insert commands from the pg dump file or from Heroku app?
Mr. Black
  • 11,692
  • 13
  • 60
  • 85
0
votes
1 answer

pg_dump cannot find the database

Easy points for anyone but me. I am trying to use pg_dump. I am running Mac OSx, postgres.app, 9.2, and I want to back up my db. I tried the other solutions for the same problem, but no success. The postgres.app is running on 5432 as far as I can…
user2104778
  • 992
  • 1
  • 14
  • 38
0
votes
0 answers

Segmentation fault in pg_dump utility from PostgreSQL 9.2.3

I am using PostgreSQL 9.2.3 in my development board,I am taking backup of database using following command and get segmentation fault. /bin/pg_dump -U db_admin -t mytable -b -C -Ft MYDB|gzip >/home/mydb.tar.gz I have analyzed dump core using gdb and…
Ritesh Prajapati
  • 953
  • 2
  • 13
  • 22
0
votes
1 answer

postgres case sensitive for function names

When I create my function in postgres and call it something like getOrder it works just fine. However, when I then do a pg_dump, it dumps it as getorder, thus not preserving the case. That makes everything break if I have to do a restore. I found…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
2 answers

pg_dump generates invalid SQL command

When I run pg_dump on my database, it's converting one of my views (orders_plus) to a table, and then creating a rule that I guess puts it back to the equivalent of a view. That seems to be OK (though strange). However, right after the 'CREATE…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Postgresql's pg_dump and pg_restore across different major versions?

Recently I came across a (maybe known problem) when Postgre's versions differ in major number (always upgrade, no downgrade), for example with field types. In my case, there was very little conflicting data so I changed it by hand, but wanted to…
StormByte
  • 1,266
  • 1
  • 13
  • 33
0
votes
0 answers

Dumping a subset of all tables based on some condition

We have a primary database, but also offer machines for deployment in field applications. Often the people in the field will only want some specific data in the database. For the simplest example say everything in the database can be filtered on a…
user1676521
0
votes
1 answer

problems with pg_restore in PgAdminIII

I need some help with a Postgres backup. I am trying to restore a database backup from the pgAdmin III 1.16.1 from Windows 7 x32. The original database is in one server (also w7) and the other one is on a Ububtu Server. I have tried every…
user2610995
  • 1
  • 1
  • 2
0
votes
2 answers

postgres copy tables from another database using pg_dump?

I would like to copy two tables from database A to database B, in postgres how can I do it using pg_dump without losing the previous tables and data in database B ? I read some answers in Stack Overflow suggesting using pg_dump but in the…
Medya Gh
  • 4,563
  • 5
  • 23
  • 35
0
votes
1 answer

Backing up PostgreSQL

I'm a new to PostgreSQL and I'm looking to backup the database. I understand that there are 3 methods pg_dump, snapshot and copy and using WAL. Which one do you suggest for full backup of the database? If possible, provide code snippets.
0
votes
1 answer

Upload a file into a ftp server using buffered output with Curl

I want to upload a database backup file into an external ftp server using curl. I use postgres and pg_dump streams the content of file into buffered output. I tried echo pg_dump dbname| gzip" | curl -d @- ftp://user:pass@host:/pg_dump/$(date…
burak emre
  • 1,501
  • 4
  • 22
  • 46
0
votes
2 answers

Create a new function from an existing function in Postgres?

I have created a function function_1() in Postgres. Now I want to create another similar function function_2() and copy the content of function_1(). Any Postgres command line can do that? So far I only used copy&paste method in the command line to…
Xianlin
  • 1,139
  • 5
  • 20
  • 34
0
votes
1 answer

STDERR of pg_dump in UTF-8

I am redirecting the stderr of pg_dump to file: pg_dump ...... 2>pg_dump.log but this file is ANSI-encoded. I would like to see it in UTF-8 or Unicode. Is this possible?
Paul
  • 25,812
  • 38
  • 124
  • 247
0
votes
1 answer

Needing to change the encoding of a compressed sql .dmp file

I was needing to change the encoding of a compressed .dmp file created using the pg_dump command. Currently I only have the dump file and not the whole database. How can I alter the file to be compliant with another encoding? I would like to go…
user972276
  • 2,973
  • 9
  • 33
  • 46
0
votes
1 answer

Issue using pg_dumpl

Ok, here's the issue: I want to upload a DB I've got locally and I'm using in localhost, but, when I use: PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U root app_db > app_db.dump I always get: pg_dump: [archiver (db)]…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
1 2 3
43
44