pg-dump Questions
4
Solved
I need to extract SQL files from multiple tables of a PostgreSQL database. This is what I've come up with so far:
pg_dump -t 'thr_*' -s dbName -U userName > /home/anik/psqlTest/db_dump.sql
Ho...
Pinero asked 20/8, 2013 at 8:27
2
I am attempting to back up a PostgreSQL database from pgAdmin 4, but a pg_dump backup process is already running, and I am unable to stop it.
I've restarted the postgres server, restarted the serve...
3
Solved
I would like to get a database by name from a pg_dumpall and import it into my local postgres. If possible, I'd like to use a different database name on my local machine. Is this possible?
Cyclo asked 20/7, 2015 at 20:27
1
Solved
So I regularly backup and restore databases and schema's using pgadmin4. I would like to do it with a batch file using commands as pg_dump and pg_restore. I however always fail to succeed in this a...
Soberminded asked 12/2, 2018 at 12:39
1
Solved
Is it possible to use Postgres' pg_dump to write the backup to an Azure Blob storage? I have almost 2TB of data on a VM in a postgres DB and I need to migrate all the data to a blob storage.
Moonraker asked 22/11, 2017 at 9:57
1
I'm attempting to pg_dump (v9.3.4) from one db and pg_restore into another (v9.3.6). I have several materialized views (some with indexes and some with no indexes). One of my materialized views is ...
Cataplasm asked 21/4, 2015 at 21:49
1
Solved
Say I have two host servers s1 and s2. In both the servers i have a schema named n1, now i have made some changes to some of the tables present in schema n1 of s1. I want the same change to be done...
Colloquium asked 25/4, 2017 at 6:28
2
Solved
I know this is a weird request, but for some hacky reasons I can't avoid, I'd like to be able to consistently sync a few tables from one database to another. I know I could write out the functional...
Schmo asked 21/4, 2017 at 15:15
2
Solved
Actually I need to populate MySQL database from a SQL file which was generated by postgresql as
pg_dump dbname > myfile.sql
So, if I try to do like
mysql> source myfile.sql
This obviou...
Pulmonate asked 5/5, 2012 at 12:55
3
omnia@ubuntu:~$ psql --version
psql (PostgreSQL) 9.3.4
omnia@ubuntu:~$ pg_dump --version
pg_dump (PostgreSQL) 9.2.8
omnia@ubuntu:~$ dpkg -l | grep pg
ii gnupg 1.4.11-3ubuntu2.5 GNU privacy guard - ...
Quadripartite asked 21/5, 2014 at 21:5
1
Solved
wondering about a little convenience problem of mine atm.
Say I got a database with a variable amount of tables and I want a dump of that database BUT only the table structure and the data of one ...
Leges asked 24/1, 2017 at 10:17
5
Solved
I have a (production) DB server running PostgreSQL v9.0 and a development machine running PostgreSQL v8.4. I would like to take a dump of the production DB and use it on the development machine. I ...
Chomp asked 5/1, 2011 at 0:3
2
Hi can anyone help me dump from a postgreSQL database on a remote AWS server to a postgreSQL database on my local machine.
I've been trying to do it using the answer in this stack post but it keep...
Kincardine asked 13/5, 2015 at 22:22
1
Solved
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 ...
Mickens asked 3/8, 2015 at 17:36
1
As per the title.
I've looked at the man page and it doesn't seem like there is any command-line argument to include the "IF NOT EXISTS" clause in the "CREATE TABLE" statements.
Papain asked 17/6, 2015 at 0:42
0
Is there any way to force PostgreSQL 9.3 backup / restore schema in the correct sequence of dependent objects?
Example
I need to create a function that is used in the materialized views before crea...
Kuster asked 8/6, 2015 at 11:6
3
Solved
I do want to search for some data inside a database dump but these dumps are using the binary-compressed format (PGDMP header).
How can I convert these to SQL without restoring them?
Mabuse asked 29/1, 2014 at 11:12
4
How to compare postgres dump files?
I have two dump files, dump1 and dump2 . And I want to compare these two dump files.
Any help will be appreciated..
Thank you
Kirin asked 19/4, 2011 at 8:59
4
Solved
I have a local psql database dump that needs to be uploaded to heroku. I followed the steps in the Update section from this link. Everything worked fine until the last part, the actual uploading st...
Globeflower asked 9/1, 2013 at 16:7
1
Solved
I was trying to do a backup using pg_dump.
There is an option keep me wondering.
According to pg_dump --help
-b, --blobs include large objects in dump
I try looking for blobs, but only got i...
Guarantor asked 2/7, 2014 at 22:40
2
Solved
I am new to Postgres and just discovered that I cannot access data of different databases in one SQL query. And also learned the concept of schema in Postgres.
Now, I have two databases
db1 and d...
Star asked 6/6, 2014 at 11:32
1
I need to copy the contents of a table from one database to another database with an identical table which is currently empty.
I plan to dump the table data from the old table and then simply impo...
Rachael asked 23/4, 2014 at 18:54
1
I want to create a postgres backup script but I don't want to use the postgres user because the unix system I am in has few restrictions. What I want to do is run this script as a regular user of t...
Cocke asked 12/3, 2014 at 16:30
2
Solved
I'm trying to copy a table from one database to another database (NOT schema). The code I used in terminal is as below:
pg_dump -U postgres -t OldSchema.TableToCopy OldDatabase | psql -U postgres...
Hemimorphic asked 26/12, 2013 at 5:33
1
I have two databases running on different servers in different timezones. There is a couple of tables which contains timestamp with timezone.
I need to dump data from one database and to import it...
Understanding asked 28/11, 2013 at 15:2
© 2022 - 2024 — McMap. All rights reserved.