Announcement

Collapse
No announcement yet.

postgresql database

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    postgresql database

    I have setup my computer to dual boot (windows 7, and kubuntu 14.04). I used to only run windows7 and one of the windows applications, uses a postgresql database. Now i want to make a transistion to kubuntu. So i can delete the windows partition. But i need that database. So what i need is to somehow copy the database from the windows7 system to the kubuntu system, Or create the same database on the kubuntu system and populate it with the right data.

    Hope i am making any sense :P

    What is the easiest way to do this?

    #2
    How are you backing up your data now? Using pgadmin, you can dump your data and restore to the same version of postgres on Kubuntu.

    Comment


      #3
      Have you tried simply dumping the database to a file and then loading it up in ubuntu?
      https://www.postgresql.org/docs/9.1/...ckup-dump.html

      Comment


        #4
        thanks. that was exactly what i was looking for.

        Comment


          #5
          If you use the command line it isn't quite as simple as 'pg_dump dbname > outfile'. You will need to include some options.
          http://www.postgresonline.com/downlo...cheatsheet.pdf

          I find it easier to open pgadmin on Windows, highlight the database folder under the server, right click the database folder and choose the backup option (the backup option IS pg_dump). You can then go into pgadmin on Kubuntu, create a new blank database with the same name as your database on Windows, right click that blank database and choose restore. You have to be careful to use the same version on Windows and Kubuntu because the schema otherwise might not be the same. Depending on the program you are using with postgres, you may also have to back up and restore the globals for your postgres server (Right click the server in pgadmin rather than the database folder) and choose backup globals. This is actually pg_dumpall and creates a SQL file. Using pgadmin on Kubuntu you use the file to run a SQL query to load the globals.

          Comment

          Working...
          X