Обсуждение: Conversion from 8.4 to >9 version question
Hope this has not been just recently covered if so apologies. I'm after a simple way to upgrade from 8.4 to the latest version of postgres (my server is a ubuntu 10 LTS I think) When I back up my work database I just use pgadmin > backup as plain text > take it home, rebuild it on my home machine which does run 9.1 - on the command line using: psql databasename -f the-backup-filename This seems to work ok and my software runs ok and I can access all my data Can I just do a server upgrade to the latest ubuntu version and postgres version and then do a similar command line import safely or is this too simplistic a way of looking at it? If one does do the upgrade what happens to the actual database itself if one doesn't explicity do anything? Thanks in anticipatation. Richard
--As of April 17, 2013 8:21:06 AM +1000, Richard Terry is alleged to have said: > When I back up my work database I just use pgadmin > backup as plain text > > take it home, rebuild it on my home machine which does run 9.1 - on the > command line using: psql databasename -f the-backup-filename > This seems to work ok and my software runs ok and I can access all my > data > > Can I just do a server upgrade to the latest ubuntu version and postgres > version and then do a similar command line import safely or is this too > simplistic a way of looking at it? If one does do the upgrade what > happens to the actual database itself if one doesn't explicity do > anything? --As for the rest, it is mine. A similar command line import (with the export done before the upgrade) should be fine, especially if you've tested the procedure already. An upgrade-in-place with the same data files between major revisions (8 -> 9) is not expected to work, but I've seen it happen on occasion. Even if it appears to, don't trust it though; I'd clean and drop everything than re-import just to be sure. What happens to the database depends on what your package manager decides, most likely. Daniel T. Staal --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------
Daniel Staal wrote: > --As of April 17, 2013 8:21:06 AM +1000, Richard Terry is alleged to > have said: > >> When I back up my work database I just use pgadmin > backup as plain >> text >> > take it home, rebuild it on my home machine which does run 9.1 - on >> the >> command line using: psql databasename -f the-backup-filename >> This seems to work ok and my software runs ok and I can access all my >> data >> >> Can I just do a server upgrade to the latest ubuntu version and postgres >> version and then do a similar command line import safely or is this too >> simplistic a way of looking at it? If one does do the upgrade what >> happens to the actual database itself if one doesn't explicity do >> anything? > > --As for the rest, it is mine. > > A similar command line import (with the export done before the > upgrade) should be fine, especially if you've tested the procedure > already. > > An upgrade-in-place with the same data files between major revisions > (8 -> 9) is not expected to work, but I've seen it happen on occasion. > Even if it appears to, don't trust it though; I'd clean and drop > everything than re-import just to be sure. What happens to the > database depends on what your package manager decides, most likely. > > Daniel T. Staal > > --------------------------------------------------------------- > This email copyright the author. Unless otherwise noted, you > are expressly allowed to retransmit, quote, or otherwise use > the contents for non-commercial purposes. This copyright will > expire 5 years after the author's death, or in 30 years, > whichever is longer, unless such a period is in excess of > local copyright law. > --------------------------------------------------------------- > Thanks, will bite the bullet next weekend and upgrade my server, probably export witha dump all commmand to keep all the users. richard