>
> If I have taken any backup successfully through pg_dump? How can I restore
> this pg_dump(Sql file) without use of pg_restore.
>
You can send the file to psql, the command line client:
psql yourdb < yourbackup.sql
Or:
cat yourbackup.sql | psql yourdb
Kind regards,
Andomar
--
Please keep the list in your answers.
Le 10 août 2015 7:51 AM, "Sachin Srivastava" a
écrit :
>
> Dear Guillaume,
>
> What is the syntax of this (psql), kindy confirm.
>
That can be: psql -f the_file the_database
> Regards,
> Sachin
>
> On Mon, Aug 10, 2015 at 11:18 AM, Guillaume Lelarge <
guill
On Mon, Aug 10, 2015 at 2:41 PM, Sachin Srivastava
wrote:
> Dear Team,
>
> If I have taken any backup successfully through pg_dump? How can I restore
> this pg_dump(Sql file) without use of pg_restore.
> There is any command line option or through psql, kindly inform to me.
The way to restore a b
Hi,
Le 10 août 2015 7:43 AM, "Sachin Srivastava" a
écrit :
>
> Dear Team,
>
> If I have taken any backup successfully through pg_dump? How can I
restore this pg_dump(Sql file) without use of pg_restore.
>
> There is any command line option or through psql, kindly inform to me.
>
If it's an SQL f
Dear Team,
If I have taken any backup successfully through pg_dump? How can I restore
this pg_dump(Sql file) without use of pg_restore.
There is any command line option or through psql, kindly inform to me.
Regards,
Sachin
On Mon, Sep 8, 2014 at 8:10 PM, Adrian Klaver wrote:
>
> You do not have to create a database in Postgres either. There are some
> system databases already created for you, template0(read only best left
> alone), template1 and postgres. You can connect to one of these(best
> practices, use postgre
On 09/08/2014 10:49 AM, klo uo wrote:
Hi Adrian,
I used pgAdmin backup command.
However in the meantime I figured how to restore.
I first have to create database, and then use restore option which
becomes available if I right-click on a database.
On MSSQL for example, I can restore database with
Hi Adrian,
I used pgAdmin backup command.
However in the meantime I figured how to restore.
I first have to create database, and then use restore option which becomes
available if I right-click on a database.
On MSSQL for example, I can restore database without creating database
first, and I guess
On 09/08/2014 09:04 AM, klo uo wrote:
Hi,
I use PostrgrSQL 9.3 for couple of months now, on Windows.
I installed new Window OS, and before installing, I made tar backups of
my PostgreSQL databases.
What was the command you used?
Now I want to restore these on my new OS, but I can't find such
Hi,
I use PostrgrSQL 9.3 for couple of months now, on Windows.
I installed new Window OS, and before installing, I made tar backups of my
PostgreSQL databases.
Now I want to restore these on my new OS, but I can't find such option in
pgAdmin.
In documentation (http://www.postgresql.org/docs/9.3/
On 9/13/2013 2:03 PM, Bob Futrelle wrote:
Running on my MacBook Pro, pgAdmin3 tells me I have four servers in
"Server Groups",
all local, no network involved.
I have dumped two of my DBs from a current server using pg_dump.
Then in pgAdmin3 I created another server, let's call it "New".
I woul
Running on my MacBook Pro, pgAdmin3 tells me I have four servers in "Server
Groups",
all local, no network involved.
I have dumped two of my DBs from a current server using pg_dump.
Then in pgAdmin3 I created another server, let's call it "New".
I would like to look at these earlier DBs while not
It will be that if you have the tablespaces in the actual directories.
The question is how and why you ended up with the tablespaces in the
actual directories there, and not symlinks. It seems rather pointless
to have tablespaces if they go in there...
//Magnus
On Thu, Dec 1, 2011 at 13:35, Samba
Hi Venkat,
I verified that the tablespaces are located in actual directories and not
any symbolic links. Another interesting thing is that the content in these
additional tar.gz files is already present in the base.tar.gz file.
Regards,
Samba
--
Do you have Tablespace directories with a softlink to the data directory ?
Thanks
VB
On Wed, Nov 30, 2011 at 7:42 PM, Samba wrote:
> Hi all,
>
> I have taken a base backup of my master server using pg_basebackup command
> as below:
> pg_basebackup -D /tmp/PostgresBackup/ -Ft -Z 9 -l masterback
Hi all,
I have taken a base backup of my master server using pg_basebackup command
as below:
pg_basebackup -D /tmp/PostgresBackup/ -Ft -Z 9 -l masterbackup -h
localhost -U replication -w
The above created 4 tar files, namely: 16394.tar.gz 16395.tar.gz
16396.tar.gz base.tar.gz
I do know that
You can do this by converting the characters in raw dump file directly.
iconv -f 8859_1 -t UTF-8 backup.db.psql > backup.db.psql.utf8
Then convert the line in backup.db.psql.utf8 from:
SET client_encoding = 'SQL_ASCII';
to:
SET client_encoding = 'UTF8';
--
View this message in context:
http:/
Adrian Klaver writes:
> On 12/16/2010 08:47 AM, Andrus Moor wrote:
>>> Loading a dump file into an older server may require manual editing of
>>> the dump file to remove syntax not understood by the older server. "
>> pg_restore ignores erros during restore (it only returns exit code 1).
>> So "m
On 12/16/2010 08:47 AM, Andrus Moor wrote:
Loading a dump file into an older server may require manual editing of
the dump file to remove syntax not understood by the older server. "
pg_restore ignores erros during restore (it only returns exit code 1).
So "manual editing of the dump file to re
On 16 Dec 2010, at 9:16, Andrus Moor wrote:
> How to fix this without distributing two copies of pg_dump/pg_restore ?
> Is it reasonable to create database and plpgsql language manually before
> running pg_restore ? In
Are you sure that restoring dumps to your customers' sites is the best appro
Loading a dump file into an older server may require manual editing of
the dump file to remove syntax not understood by the older server. "
pg_restore ignores erros during restore (it only returns exit code 1).
So "manual editing of the dump file to remove syntax not understood" is
never requi
On Thursday 16 December 2010 12:16:47 am Andrus Moor wrote:
> > Another testimonial to the stability of Postgres :)
> > We may be arguing semantics
> > here but I would consider dump/restore an admin function. How do you
> > handle a
> > client restoring a database currently?
>
> Database is 8.0 co
On 2010-12-16 11.21, Jayadevan M wrote:
Hello,
I don't know for sure, but I don't see why it should fail - it's only
reading it, not writing data to it or making any changes.
Probably it will fail...
http://www.postgresql.org/docs/9.0/static/sql-createdatabase.html
Although it is possible to
On 2010-12-16 11.12, Andrus Moor wrote:
Robert,
I'm probably misunderstanding but "CREATE DATABASE foo TEMPLATE bar"
will clone bar as foo including data. Of course this only works within
the same cluster.
Than you.
You are genious
I haven't never tought about this.
Will this work if datab
Hello,
> I don't know for sure, but I don't see why it should fail - it's only
> reading it, not writing data to it or making any changes.
Probably it will fail...
http://www.postgresql.org/docs/9.0/static/sql-createdatabase.html
Although it is possible to copy a database other than template1 by
On 16/12/2010 10:12, Andrus Moor wrote:
Robert,
I'm probably misunderstanding but "CREATE DATABASE foo TEMPLATE bar"
will clone bar as foo including data. Of course this only works within
the same cluster.
Than you.
You are genious
I haven't never tought about this.
Will this work if databas
Robert,
I'm probably misunderstanding but "CREATE DATABASE foo TEMPLATE bar" will
clone bar as foo including data. Of course this only works within the same
cluster.
Than you.
You are genious
I haven't never tought about this.
Will this work if database bar is accessed by other users ? Proba
On 2010-12-16 09.16, Andrus Moor wrote:
Another requirement is to clone existing database in server with data. I
posted question about it and it seems that PostgreSql does not have any
capability to do this in server side in plpgsql fast.
I'm probably misunderstanding but "CREATE DATABASE f
Another testimonial to the stability of Postgres :)
We may be arguing semantics
here but I would consider dump/restore an admin function. How do you
handle a
client restoring a database currently?
Database is 8.0 compliant.
In this case 8.4 pg_dump/pg_restore is used to dump and restore with a
On Wednesday 15 December 2010 11:55:24 am Andrus Moor wrote:
> > I got to thinking more about this. How are the databases administered? In
> > other
> > words how are they started/stopped, upgraded, logs read, etc?
>
> Databases are working many years in 24x7 mode without administration.
> For ever
Le 15/12/2010 17:26, Adrian Klaver a écrit :
> On 12/15/2010 07:34 AM, Andrus Moor wrote:
>>> No, this is just pilot error. Any version of pg_dump will produce
>>> output that is meant to be loaded into the matching server version
>>> (or a later version). If you are intending to load back into 8.4
I got to thinking more about this. How are the databases administered? In
other
words how are they started/stopped, upgraded, logs read, etc?
Databases are working many years in 24x7 mode without administration.
For every new new site newest PostgreSql was installed.
Andrus.
--
Sent via pg
"Andrus Moor" writes:
>> No, this is just pilot error. Any version of pg_dump will produce
>> output that is meant to be loaded into the matching server version
>> (or a later version). If you are intending to load back into 8.4,
>> use the 8.4 pg_dump.
> Windows application needs to support ba
On Wednesday 15 December 2010 8:43:18 am Andrus Moor wrote:
> > Why does it have that requirement? And why doesn't it use the pg_dump
> > that came with the server? It seems pretty lame to assume that your app
> > has to provide pg_dump and not any other part of the Postgres
> > installation.
>
>
On 12/15/2010 08:43 AM, Andrus Moor wrote:
Why does it have that requirement? And why doesn't it use the pg_dump
that came with the server? It seems pretty lame to assume that your app
has to provide pg_dump and not any other part of the Postgres
installation.
Application is like pg_admin.
It i
Why does it have that requirement? And why doesn't it use the pg_dump
that came with the server? It seems pretty lame to assume that your app
has to provide pg_dump and not any other part of the Postgres
installation.
Application is like pg_admin.
It is typical client application which is used
On 12/15/2010 07:34 AM, Andrus Moor wrote:
No, this is just pilot error. Any version of pg_dump will produce
output that is meant to be loaded into the matching server version
(or a later version). If you are intending to load back into 8.4,
use the 8.4 pg_dump.
You may have been reading the rec
No, this is just pilot error. Any version of pg_dump will produce
output that is meant to be loaded into the matching server version
(or a later version). If you are intending to load back into 8.4,
use the 8.4 pg_dump.
You may have been reading the recommendation to use the later version's
pg_
"Andrus Moor" writes:
> I used only 9.0 dump and restore. I did the following:
> 1. Created backup copy from 8.4.3 using 9.0 pg_dump
> 2. Restored from this backup to 8.4.3 using 9.0 pg_restore
> 9.0 pg_restore fails since 8.4.3 server reports invalid sql command in
> create
> language plpgsql
Adrian,
thank you.
I am not sure I follow. Are you taking a pg_dump of a 9.0 database using a
9.0
version of pg_dump and trying to restore to a 8.4.3 database or are using
the
9.0 pg_dump against the 8.4.3 server and then restoring back to it? In
either
case the problem you see above will proba
On Wednesday 15 December 2010 1:29:09 am Andrus Moor wrote:
> Server is
>
> PostgreSQL 8.4.3 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian
> 4.3.2-1.1) 4.3.2, 32-bit
>
> Backup is created using 9.0RC pg_dump.exe file
>
> Trying to restore from this backup to same server using 9.0RC
>
You can test restore by change CREATE OR REPLACE PROCEDURAL LANGUAGE
plpgsql; to CREATE PROCEDURAL LANGUAGE plpgsql;
Tuan Hoang Anh
2010/12/15 Andrus Moor
> Server is
>
> PostgreSQL 8.4.3 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian
> 4.3.2-1.1) 4.3.2, 32-bit
>
> Backup is created
Server is
PostgreSQL 8.4.3 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian
4.3.2-1.1) 4.3.2, 32-bit
Backup is created using 9.0RC pg_dump.exe file
Trying to restore from this backup to same server using 9.0RC pg_restore.exe
causes error
"..\pg_dump\pg_restore.exe" -h mysite.com -U
On 10/01/2010 10:40 PM, Alexander Farber wrote:
Ouch! I've loaded my backup while being connected
to the wrong database - to the dafeult "postgres" database.
Is there a way to restore it?
Sure. Just drop it and re-create it. The "postgres" database is just a
convenience, and is typically empt
Ouch! I've loaded my backup while being connected
to the wrong database - to the dafeult "postgres" database.
Is there a way to restore it? I currently have:
postgres=# \l
List of databases
Name| Owner | Encoding
---+--+--
postgres | postgres | UTF8
ph
sunpeng writes:
> Thanks for your help!The motivation is that I try to find the most used sub
> plan ,and cach the sub plan's execution result and store sub plan itself on
> disk. Even the sub plan's connection is closed, the consequent connection
> with the same sub plan could utilize the stored
Thanks for your help!The motivation is that I try to find the most used sub
plan ,and cach the sub plan's execution result and store sub plan itself on
disk. Even the sub plan's connection is closed, the consequent connection
with the same sub plan could utilize the stored cached result.
For examp
sunpeng writes:
> I've used the following codes to translate the PlannedStmt node to a char
> string:
> PlannedStmt * pltl = (PlannedStmt *) linitial(plantree_list);
> Plan *pl = pltl->planTree;
> char *s;
> s = nodeToString(pl);
> How to restore from this s to Plan?
You can't. The fact
I've used the following codes to translate the PlannedStmt node to a char
string:
PlannedStmt * pltl = (PlannedStmt *) linitial(plantree_list);
Plan *pl = pltl->planTree;
char *s;
s = nodeToString(pl);
How to restore from this s to Plan?
I noticed using func parseNodeString() in /backends/
Postgres User wrote:
Hi,
I have a database that was created with SQL-ASCII encoding
(unfortunately). I ran pg_restore to load the struct and data into a
new database with UTF-8 encoding but no surprise- I'm seeing this
error for a number of tables:
pg_restore: [archiver (db)] COPY failed: ERRO
> I have a database that was created with SQL-ASCII encoding
> (unfortunately). I ran pg_restore to load the struct and data into a
> new database with UTF-8 encoding but no surprise- I'm seeing this
> error for a number of tables:
>
> pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte
Hi,
I have a database that was created with SQL-ASCII encoding
(unfortunately). I ran pg_restore to load the struct and data into a
new database with UTF-8 encoding but no surprise- I'm seeing this
error for a number of tables:
pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequen
Hello,
We tried many things but didnt succeed.
Our DB crashed without any recent backup.
We have 3 elements:
- a backup we did in February,
- 4 WAL files in the pg_xlog folder created in august,
- the base folder (in which there are table files created in august)
Q1 : Is it possible to cop
Thanks for ur help guys.
--
View this message in context:
http://www.nabble.com/How-to-restore-a-dumbed-file-in-postgreSQL-tf2695735.html#a7535475
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
---(end of broadcast)---
TI
On 23 Nov 2006 at 20:13, Yesh wrote:
> I am a newbie to postgreSQL. I need to know the command for
> restoring a database that has been dumped. I am using postgreSQL8.1
If you dumped using the text format, simply use the resulting
dumpfile as input to psql, something like this -
psql -f
- a
> I am a newbie to postgreSQL. I need to know the command for restoring a
> database that has been dumped. I am using postgreSQL8.1 version & am
> running in windows environment.
See.
http://www.postgresql.org/docs/8.2/interactive/backup-dump.html#BACKUP-DUMP-RESTORE
Also,
you will find a weal
Hi,
I am a newbie to postgreSQL. I need to know the command for restoring a
database that has been dumped. I am using postgreSQL8.1 version & am
running in windows environment.
--
View this message in context:
http://www.nabble.com/How-to-restore-a-dumbed-file-in-postgreSQL-tf2695735.html#a
57 matches
Mail list logo