Tagged Questions
1
vote
0answers
26 views
pg_restore and psql asks password for restoring dump file
This will be probably extreme novice question but I want to restore a .backup dump file. I have tried the following command:
pg_restore -i -h localhost -p 5432 -U postgres -d old_db -v ...
0
votes
1answer
127 views
Postgresql: Difference between pg_dump and backup/restore?
Don't they essentially do the same thing by storing all the data in a file and dumping it into another database? Is it that pg_dump just adds the data on to whatever is already there and restore ...
2
votes
1answer
306 views
Ensure correct username when using pg_restore
I have just installed postgres 9.1.6 on a local Ubuntu server. Now I'm trying to restore a database dump from a database on Heroku. The local database is setup like this:
sudo -u postgres psql -c ...
3
votes
1answer
426 views
How to wait between PostgreSQL DB restore and reindexing?
I've written a script to upgrade PostgreSQL from 8.2.1 to 9.2.1 on a Linux From Scratch distribution:
Start the pg service
Vacuum all DBs (not sure if this is needed)
Backup with pg_dumpall
Stop the ...
3
votes
2answers
187 views
How to wait for PostgreSQL to be startable / restorable?
I'm testing a PostgreSQL 8.2.1 to 9.2 upgrade on a virtual machine running a custom Linux distro. The upgrade procedure is as follows:
Start the pg service
Vacuum all DBs (not sure if this is ...
2
votes
3answers
667 views
Copy PostgreSQL data from one PC to another
I am migrating my server application from the existing system to another system. Unfortunately, the existing system is also the database server. It has data stored. Is it possible to copy this data to ...
1
vote
1answer
937 views
disable constraints before using pg_restore.exe
When I try to execute pg_restore.exe of a dump file from a database, it throws dozens of errors, all the same:
ERROR: insert or update on table "someTable" violates foreign key constraint ...
1
vote
1answer
147 views
Questions about PostgreSQL backup/restores
I've inherited a large PostgreSQL 8.4.7 database that is currently not being backup at all. The database itself I believe is around 100GB, I've been reading about the different methods to backup this ...
0
votes
1answer
195 views
Drop and restore PostgresSQL database without losing settings
This seems like a simple, easy question, but I'm very new to PostgreSQL administration and I'm not sure of the best way to do things. I have a PostgreSQL (9.1) database that somehow got corrupted ...
0
votes
1answer
822 views
postgresql: how do I dump and restore roles for a cluster?
Where are roles stored in a cluster, and how do I dump them?
I did a pg_dump of a db and then loaded it into a different cluster, but I get a lot of these errors:
psql:mydump.sql:3621: ERROR: role ...
3
votes
1answer
783 views
Why is my postmaster process (sometimes) becoming unmanageable after a WAL base restore?
TL;DR: Un-stoppable, unusable postmaster is being spawned when Postgres is started right after restoring its data directory from a WAL base backup. Why?
Context:
We run postgresql 8.4, on CentOS 6, ...
2
votes
2answers
842 views
Trouble recovering data from corrupted PostgreSQL tables
I'm trying to recover my database after a recent corruption of the same. Now I have two tables that are really giving me trouble.
When I do select count(*) One table returns:
ERROR: could not ...
1
vote
0answers
92 views
pg_dump dumps casts after views using them [closed]
My small but annoying problem is that the regular backups of a database of ours always list the user-defined casts after those views that would make use of them. For this reason I have to maintain a ...
0
votes
2answers
2k views
Opening a .backup file for PostgreSQL
I'm going to warn you that whoever explains this needs to talk to me like I'm five years old, because this is something way, way beyond my level of expertise.
In short, I have what I think is a ...
3
votes
1answer
721 views
PostgreSQL Scheduled Database Backup
For scheduling a daily back up on a postgres database we execute the following command:
0 2 * * * /usr/local/pgsql/bin/pg_dump -Fp -b -U database_name \
> ...
2
votes
1answer
235 views
Postgresql revert back database value
I have postgresql database.
My table name is tblvoippolicy. Now, problem is by mistake i have deleted some records from table.
When I get the data file using following commands.
select * from ...
2
votes
1answer
526 views
Does my choice of pg_dump format impact restore speed?
According to the docs for my version of Postgres (8.4.2), pg_dump can "output in script or archive file formats." The script-formatted dump (4GB) takes 1.5 hours to restore, and I'm wondering if the ...