Обсуждение: backup-restore does not work

Поиск
Список
Период
Сортировка

backup-restore does not work

От
Art Fore
Дата:
Using PGadminIII, I backup my database on linux machine (Postgresql 
7.4), and try to restore it on the windows machine (Postgresql 8.0 
beta5). Alway comes up with duplicate key on the first item.  I drop all 
views and the only table in the database and try again. Still same 
thing. I do a refresh, none of the views or table were dropped.

What is the secret of backup-restore is pgadmin?

Art


Re: backup-restore does not work

От
Art Fore
Дата:
Tried a refresh again and the table and views were gone. Then the 
restore worked. I do not understand why I do a refresh after dropping 
the table and views, they are still there, then a little later, do a 
refresh, they are gone. WHY?

How does one do an update to a table that is completely changed other 
than dopping it and restoring it? Seems like there should be an easier 
way that backup-restore.

Art

Art Fore wrote:
> Using PGadminIII, I backup my database on linux machine (Postgresql 
> 7.4), and try to restore it on the windows machine (Postgresql 8.0 
> beta5). Alway comes up with duplicate key on the first item.  I drop all 
> views and the only table in the database and try again. Still same 
> thing. I do a refresh, none of the views or table were dropped.
> 
> What is the secret of backup-restore is pgadmin?
> 
> Art
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 


Re: backup-restore does not work

От
Andreas Pflug
Дата:
Art Fore wrote:
> Tried a refresh again and the table and views were gone. Then the 
> restore worked. I do not understand why I do a refresh after dropping 
> the table and views, they are still there, then a little later, do a 
> refresh, they are gone. WHY?
> 

Apparently you had some stuff in the database you took as template when 
creating the database. To restore a full backup of a db, I'd recommend 
to use template0.

> How does one do an update to a table that is completely changed other 
> than dopping it and restoring it? Seems like there should be an easier 
> way that backup-restore.

Restore is not for updating, but as the name says for reconstructing 
empty databases and tables from scratch. It's on your own responsibility 
to make sure your restore target is as empty as restore expects it.

Regards,
Andreas