From: R P. <arc...@mt...> - 2007-04-05 14:18:17
|
On Monday 02 April 2007 6:01 pm, Glen Morris wrote: > I have a script that backs up my psql databases each night (SL 2.6.27). > For the first time I tried to restore (because of failed 2.8.0 upgrade) > from one but it failed. I used this command to create the backup: > > pg_dump -U sql-ledger dea > /spare/backup/postgresql/pgsql-dea_`date > +%G%m%d`.sql > > And then tried to restore as per the manual with: > > psql -U sql-ledger dea < pgsql-dea_20070402.sql > > > gives lots of: > > invalid command \N > invalid command \N > invalid command \N > invalid command \N > ERROR: syntax error at or near "10078" at character 1 > LINE 1: 10078 johne > > Restoring from a SL backup works fine but I don't have one that's as > current as the pg_dump. > > Regards Glen > > Hi Glen use pg_restore to restore the data. pg_dump and pg_restore are designed to be used together. "psql -U sql-ledger dea < pgsql-dea_20070402.sql" works for restoring SL backups Cheers, Roy |