Home
Join

4 Replies

  • Do you have an intact backup of the database produced by a pg_dump command or are you just working with the raw database files (such as from a salvaged drive)? I believe the plain-text backup format, which basically just spits out all the SQL commands to recreate the database and load the data, is forward compatible with all versions. Version 11 introduced breaking changes in the archive backup format, so you would have to install version 10 to restore to, which is the oldest version currently maintained.

    If you're working with just the raw database files... not sure of the best approach. You can try websites like oldversion.com (if you trust them). Postgres doesn't host compiled versions for Windows except for their Enterprise DB, so you won't find an official Windows installer that old. Safest approach would probably be to build from source, which might be easier on a Linux system. Is the end-goal to restore a legacy application to the same OS or are you just trying to salvage the data?

    1 found this helpful thumb_up thumb_down
  • The client didn't have any backup of the database. 

    That's why my idea was to install postgresql 8.1, connect to the database and make a backup in order to migrate that backup to a newer postgresql version.

    Now the only thing I have is the "C:/Program Files/Postgresql/8.1" folder with all the installed files in it.

    I have tried to start the pg_ctl.exe file and start Pgadmin to do the connection but pg_ctl.exe does nothing when I click on it.

    Was this post helpful? thumb_up thumb_down
  • pg_ctl.exe requires some arguments to run, I only have a version 14 installation to look at. My windows service looks like this:

    Text
    "C:\Program Files\PostgreSQL\14\bin\pg_ctl.exe" runservice -N "postgresql-x64-14" -D "D:\Postgresql" -w
    

    The D- parameter specifies the data directory, which is often not the same as the installation directory. -N is just the windows service name, not needed. You'll want to open a command prompt to call pg_ctl.exe (don't double-click) so you can see any error output. Here's what the contents of the data directory will look like:

    Trying to run pg_ctl on a newer OS might fail for other reasons, it uses an older version of C++ and I'm not sure if that version used the .NET runtime or it's own runtime environment. I'm hitting the limits of my ignorance so you might want to post your question to the Postgres community.

    Was this post helpful? thumb_up thumb_down
  • Hello Guys.
    Finally it worked.
    I found during researches that I should start pg_ctl.exe under cmd like this:

    "C:\Program Files (x86)\PostgreSQL\8.1\bin\pg_ctl.exe" start -D "C:\Program Files (x86)\PostgreSQL\8.1\data\"

    Finally I was able to access the database and make a backup.

    Thank you so much for the help provided.
    Spice (1) flagReport
    1 found this helpful thumb_up thumb_down

Read these next...

  • Snap! Win 8.1, hybrid IT models, robo-fish, Jovian Vortex Hunters, & more

    Snap! Win 8.1, hybrid IT models, robo-fish, Jovian Vortex Hunters, & more

    Spiceworks Originals

    Your daily dose of tech news, in brief. Welcome to Friday! It has been a big week here as we launched Spiceworks News & Insights a few days ago. Do you know who else had their sights set high? Kenneth Arnold. On June 24, 1947, civilian pilot Ken...

  • Chrome is a memory hog?

    Chrome is a memory hog?

    Windows

    I have a win 10 pro machine with 21H2.Running chrome  102.0.5005.115.  I will open a bunch of tabs during the day (right now, 49).  And including other things that are running, there's 80% of the 12GB of RAM in the box.I've noticed that when I go into ...

  • When you are just starting out

    When you are just starting out

    IT & Tech Careers

    HI Spiceworld,I was reading some discussions around the community and I see that here it’s like we’re all part of a family, so I venture to open this discussion, hoping that you can help me/understand me or at least bring your experiences. I am a c...

  • Spark! Pro Series - June 24th 2022

    Spark! Pro Series - June 24th 2022

    Water Cooler

    Compulsion: 1: a very strong urge to do something He felt a compulsion to say something. 2: a force that makes someone do something She was acting under compulsion. 3: an act or the state of forcing an action They ...

  • Sublets and the Network

    Sublets and the Network

    Networking

    I have a situation where one of the offices is looking to sublet for 1 day a week. They want one port to put their firewall/router on and drive their network from there. My first notion is to say no and require them to pull in their own connection. I want...