postgres server recovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coolminded
    New Member
    • Mar 2007
    • 137

    postgres server recovery

    hi all,
    i have a postgres server for one online application. if the server is crashed by chance how can i recover it, if i have taken the back-up of the "data" folder. can it be done in linux, if yes then how? could anybody suggest me ? or is there any other method to do so?
    thanx in advance
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Originally posted by coolminded
    hi all,
    i have a postgres server for one online application. if the server is crashed by chance how can i recover it, if i have taken the back-up of the "data" folder. can it be done in linux, if yes then how? could anybody suggest me ? or is there any other method to do so?
    thanx in advance
    What is data folder? You mean folder with databases?

    Comment

    • coolminded
      New Member
      • Mar 2007
      • 137

      #3
      Originally posted by rski
      What is data folder? You mean folder with databases?

      hi rski,
      yes i mean the folder with databases.can it be done?


      coolminded

      Comment

      • rski
        Recognized Expert Contributor
        • Dec 2006
        • 700

        #4
        Originally posted by coolminded
        hi rski,
        yes i mean the folder with databases.can it be done?


        coolminded
        But you have only 'base' (where are databases folders) folder or whole cluster folder?

        Comment

        • coolminded
          New Member
          • Mar 2007
          • 137

          #5
          Originally posted by rski
          But you have only 'base' (where are databases folders) folder or whole cluster folder?

          my data folder is in

          /usr/local/pgsql/data

          and it contains following

          base pg_hba.conf pg_subtrans PG_VERSION postmaster.opts
          global pg_ident.conf pg_tblspc pg_xlog postmaster.pid
          pg_clog pg_multixact pg_twophase postgresql.conf serverlog

          and one more question to ask
          how to setup PITR in linux

          with regards..

          Comment

          • rski
            Recognized Expert Contributor
            • Dec 2006
            • 700

            #6
            Originally posted by coolminded
            my data folder is in

            /usr/local/pgsql/data

            and it contains following

            base pg_hba.conf pg_subtrans PG_VERSION postmaster.opts
            global pg_ident.conf pg_tblspc pg_xlog postmaster.pid
            pg_clog pg_multixact pg_twophase postgresql.conf serverlog

            and one more question to ask
            how to setup PITR in linux

            with regards..
            So you have w copy of whole cluster. What you need is to start serwer with your this cluster using command

            pg_ctl start -D path_to_data_di rectory

            was it helpful?
            See here for PITR.

            Comment

            Working...