Re: pg_dump/pg_restore

From: Sai Hertz And Control Systems <sank89(at)sancharnet(dot)in>
To: Alexey Bobkov <bax(at)sunet(dot)ru>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump/pg_restore
Date: 2004-01-12 16:17:08
Message-ID: 4002C884.3080000@sancharnet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John Siracusa 2004-01-12 16:29:52 Re: pg_dump/pg_restore
Previous Message Bruno Wolff III 2004-01-12 15:48:15 Re: Cluster in users home