[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Wierd problem with postgresql

On Sat, 2005-17-09 at 23:15 -0700, Linuxer Wang wrote:
> Matt Arnilo S. Baluyos (Mailing Lists) wrote:
> >On 9/18/05, Linuxer Wang <linuxerwang gmail com> wrote:
> >  
> >
> >>I don't want to lost my data when I reinstall fedora next time, so I
> >>decide to create a new database under /opt.
> >>    
> >>
> >
> >Why not do a pg_dump to save a copy of your database before you
> >reinstall? Then, you just move your database dump file to some place
> >that won't be affected when you reinstall and then after that just
> >restore that file again.
> >  
> >
> I often forget to dump the database and when I realize it, it's too late.
> Actually my postgresql is just for developing not industrial, but I have 
> a large /opt partition, I prefer to put many things in /opt
> and when reinstall all things are still there.
> Thanks,
> Yours,
To get things to work properly you may need to dump the 
database, then remove everything to do with it and reinstall.
After reinstalling then do initdb and create a the db on the
command line in the opt directory location {man createdb}
and reload the dump. That might be the best way to ensure 
everything gets setup with the correct permissions.

This may not survive re-installation of the OS.

Database binary storage changes sometimes during server 
upgrades and are not downward compatible. The only sure 
way to retain your data is to dump it. It is not hard 
and does not take a lot of time. We dump our databases 
every night and they are 300MB after compressed with gzip.

Good luck.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]