Re: pg_dump/pg_restore - Mailing list pgsql-admin

From Sai Hertz And Control Systems
Subject Re: pg_dump/pg_restore
Date
Msg-id 4002C884.3080000@sancharnet.in
Whole thread Raw
In response to pg_dump/pg_restore  (Alexey Bobkov <bax@sunet.ru>)
Responses Re: pg_dump/pg_restore
List pgsql-admin
Dear Alexey Bobkov ,

>
> Then a try to restore my data:
> pg_restore /path_to_database/backup/db_backup.file
> and get next error
> pg_restore: [archiver] input file does not appear to be a valid archive

Use psql instead with command
psql -U username databasename -f  yourdb_file.sql
Yes you will have to edit the file a bit.
Drawbacks are :
triggers will go of on all insert and will be stumbling block in case to
dump you may use the following command in future

pg_dump --disable-triggers -U <user_name>  -a -d -b -D -Fc -Z 9  -f
<filername.tar.gz>  <dbname>
and to restore use
pg_restore --disable-triggers -U <user_name> -d <dbname>
<backupfilename.tar.gz>

Regards,
Vishal Kashyap

pgsql-admin by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Cluster in users home
Next
From: John Siracusa
Date:
Subject: Re: pg_dump/pg_restore