Moving to Server Edition

Post Reply
Al_M
Posts: 23
Joined: 21 Jun 19 14:09
Location: Kansas City, USA

Moving to Server Edition

Post by Al_M » 12 Jun 20 0:35

Hi all.

This morning I received the newsletter advertising the Server Double License sale.

As a Single User Edition user for a year now, I was able to take advantage of the 60% off crossgrade offer and still get two server licenses. Had been thinking about upgrading to the Server version for a while and this was the right time.

Now I have downloaded all the files I think I need, but I didn't want to jump into the upgrade without the proper research. I plan to use PostgreSQL v12 as my database and I am on a Mac running macOS 10.15.4.

I found the instruction manual for the Server Installation under the Server Trial Version link (https://www.idimager.com/download-photo ... rver-editi) but it doesn't really (or explicitly) address a Single-user to Server Upgrade installation.

So I have been scouring the forum for Single-user to Server Edition upgrade posts. This post seems to be "stickied" to the top of the Topic listing for a while now --> viewtopic.php?f=57&t=23417. The post was started in 2014 and the last post was in 2018, so I have to assume the information there is still valid and accurate.

Some questions still remain though.
  • Do I need to un-install my current Single-User installation first or can both editions live on the same machine? (at least temporarily)
  • I've found posts mentioning the use of Postgre.app to make the database installation and setup easier. (here --> viewtopic.php?f=57&t=24098#p111427. Can this method be used in combination with the setup instructions found in the PDF file? In other words let the Postgre.app install the database and then use the configuration settings to complete the database setup.
  • Any "gothcas" that I haven't thought about or addressed here? I guess I'm looking for a little guidance from someone who's been down this road before.
And by all means, if there is another "definitive guide" out there to accomplish this upgrade I would be grateful for someone to point it out to me.
Photo Supreme V5 Server Edition (build 2971)
PostgreSQL 12
macOS 10.15.4 (Catalina)
Mac Pro (Late 2013), 3.0 GHz 8-Core Xeon E5, 64 GB DDR3
MacBook Pro (Mid 2015), 2.5 GHz Quad-Core i7, 16 GB DDR3L

Hert
Posts: 6216
Joined: 13 Sep 03 7:24

Re: Moving to Server Edition

Post by Hert » 12 Jun 20 10:24

To migrate from Single to Server edition should be fairly easy (but time consuming).

Requirement is that both the Single and the Server are the same version. If not, make sure that you upgrade the Single Edition to the latest build and that you install the latest Server Edition.

1. Install the Server Edition (it can exist next to the Single Edition). Follow the installation instructions. PostgreSQL 12 is my recommendation
2. Once you have the server edition installed then start it and login to get into the application
3. Close the server edition and the single edition
4. Now follow the instructions in the topic
viewtopic.php?f=57&t=23417
5. Keep in mind that the migration tool can take a while to complete, depending on your catalog size. Run it at a convenience time.
6. Once you're migrated, you need to think about your backup strategy. In the single edition that is straight forward. In the server edition, the best backup strategy is to use the backup tools from PostgreSQL. You can create a scheduled process in the OS to create the backups.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Al_M
Posts: 23
Joined: 21 Jun 19 14:09
Location: Kansas City, USA

Re: Moving to Server Edition

Post by Al_M » 13 Jun 20 21:34

Hert,

Thank you for the guidance. I was able to setup PostgreSQL 12 using the Postgre.app method. (The EDB Mac OS X installer was not co-operating, but that's another story).

Anyway, after initial modifications to the pg_hba.conf and postgresql.conf files I was able to convert my single-user catalog database to PostgreSQL DB using the PSuDataExchange tool.

On the server machine I was able to start and login to PSu Server Edition. Then I rebuilt all thumbnails.

Seems to be working just fine on the server (localhost).

Now I proceed to install PSu on a client (MacBook Pro). The application installed, and when I try to login to the server I get the following error:
Screen Shot 2020-06-13 at 2.15.56 PM.png
Screen Shot 2020-06-13 at 2.15.56 PM.png (218.17 KiB) Viewed 467 times
I dare not hit OK so I have been aborting every time. I'm fairly certain the database is not corrupt because I can run locally (on the server) without any issues.

Through much trial and error I was able to comment out the line in my pg_hba.conf file that allows connection from my client and instead I get this error:
Screen Shot 2020-06-13 at 2.14.00 PM.png
Screen Shot 2020-06-13 at 2.14.00 PM.png (154.44 KiB) Viewed 467 times
Keep in mind I am on my local network. This is my pg_hba.conf file settings for the connections:
Screen Shot 2020-06-13 at 3.22.25 PM.png
Screen Shot 2020-06-13 at 3.22.25 PM.png (110.45 KiB) Viewed 467 times
Ultimately, I would like to connect from outside my network (remotely) using my VPN, but one step at a time...

I tried to use pgAdmin on my client (MacBook Pro) and I was able to connect to the server successfully. I'm not sure what that proves other than my pg_hba.conf settings are correct and the network is intact. So why can't PSu connect???

Any ideas what may be going on?

Admittedly I am not a database admin, but what seemed pretty straight forward this has been pretty painful thus far.

Anyone with PSu Server for PostgreSQL and a Mac clients can offer suggestions, I would really appreciate it.
Photo Supreme V5 Server Edition (build 2971)
PostgreSQL 12
macOS 10.15.4 (Catalina)
Mac Pro (Late 2013), 3.0 GHz 8-Core Xeon E5, 64 GB DDR3
MacBook Pro (Mid 2015), 2.5 GHz Quad-Core i7, 16 GB DDR3L

Hert
Posts: 6216
Joined: 13 Sep 03 7:24

Re: Moving to Server Edition

Post by Hert » 14 Jun 20 21:24

The message "database disk image is malformed" is an error from SQLite (PSU Single Edition Catalog). If you get that message then please restore your catalog/thumbs catalog files from your backup.

Your pg_hba.conf file doesn't match with that from the manual. Did you do that on purpose?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Al_M
Posts: 23
Joined: 21 Jun 19 14:09
Location: Kansas City, USA

Re: Moving to Server Edition

Post by Al_M » 14 Jun 20 23:28

The message "database disk image is malformed" is an error from SQLite (PSU Single Edition Catalog).
I thought you said the single-user edition and the server edition could co-exist on the same machine(s). I have both editions installed on both server and client machines.
At some point I would abandon the single-user and completely uninstall it. But I would like to get the server version up and running on both machines first.
Somehow there is interaction between the two, because I am starting the server version when I get that error, NOT the single-user edition. In fact, I deleted the shortcut on my dock so I would not accidentally open the single-user edition.
So why is the server edition throwing up errors about the SQLite database?
If you get that message then please restore your catalog/thumbs catalog files from your backup.
I could do that, but why (at this point). I have multiple backups, but I don't plan to use it anymore as I have already converted it to PostgreSQL for use with the server edition. Unless of course I need to re-do the conversion process, but when I open the catalog on the server edition it appears perfectly fine (so far anyway).
Your pg_hba.conf file doesn't match with that from the manual. Did you do that on purpose?
Yes, after hours of frustration getting it to work, I got possibly some incorrect information from other sources on the forum and the web in general. So I have modified to look EXACTLY as in the instruction manual. Now PSu server does not even launch.
I monitored the Console system log and observed the following error when I try to launch PSu server:

Jun 14 17:05:58 Als-Mac-Pro com.apple.xpc.launchd[1] (com.idimager.idimagersu.pg.8800[843]): Service exited with abnormal code: 217
Photo Supreme V5 Server Edition (build 2971)
PostgreSQL 12
macOS 10.15.4 (Catalina)
Mac Pro (Late 2013), 3.0 GHz 8-Core Xeon E5, 64 GB DDR3
MacBook Pro (Mid 2015), 2.5 GHz Quad-Core i7, 16 GB DDR3L

Hert
Posts: 6216
Joined: 13 Sep 03 7:24

Re: Moving to Server Edition

Post by Hert » 15 Jun 20 1:58

Let’s forget about the single user edition for now. Your database was already converted. They can coexist.

1. Did you get the database malformed message in the Single or Server edition?

2. If you used the setting a from the manual for pg_hba then you should be able to connect from anywhere (the /0 at the end means that connection can be made from anywhere).
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Al_M
Posts: 23
Joined: 21 Jun 19 14:09
Location: Kansas City, USA

Re: Moving to Server Edition

Post by Al_M » 15 Jun 20 3:27

1. Did you get the database malformed message in the Single or Server edition?
All the errors I posted were generated by the server edition.
2. If you used the setting a from the manual for pg_hba then you should be able to connect from anywhere (the /0 at the end means that connection can be made from anywhere).
OK. I have made changes to match the manual.
Photo Supreme V5 Server Edition (build 2971)
PostgreSQL 12
macOS 10.15.4 (Catalina)
Mac Pro (Late 2013), 3.0 GHz 8-Core Xeon E5, 64 GB DDR3
MacBook Pro (Mid 2015), 2.5 GHz Quad-Core i7, 16 GB DDR3L

Hert
Posts: 6216
Joined: 13 Sep 03 7:24

Re: Moving to Server Edition

Post by Hert » 15 Jun 20 6:50

Can you try to delete (or rename) the file registry.db in the IDimager Systems library folder. Do this after closing psu.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Al_M
Posts: 23
Joined: 21 Jun 19 14:09
Location: Kansas City, USA

Re: Moving to Server Edition

Post by Al_M » 15 Jun 20 15:18

Success!

That was it. Not sure what happened, but it's fixed now. Both server and client machines are working! :D

By the way, what information is in the registry.db file or what function does it serve? Obviously it's not critical as it can be deleted and re-created by PSu.

While in that directory (~/Library/IDimager Systems, Inc.) I noticed a new file that was apparently created when the server edition was installed. The file is PostCatalogActions.idi and I am wondering what this file's purpose is.

Also, since the directory is shared by both the single-user and server editions, when I un-install the single-user edition will there be any issues? Will it try to delete this directory or any files in it? Obviously I will make backups prior to un-installing the single-user edition.

Next items:
  • Try to connect from outside my network.(using VPN)
  • Devise a backup scheme for the server edition.
Thanks.
Photo Supreme V5 Server Edition (build 2971)
PostgreSQL 12
macOS 10.15.4 (Catalina)
Mac Pro (Late 2013), 3.0 GHz 8-Core Xeon E5, 64 GB DDR3
MacBook Pro (Mid 2015), 2.5 GHz Quad-Core i7, 16 GB DDR3L

Hert
Posts: 6216
Joined: 13 Sep 03 7:24

Re: Moving to Server Edition

Post by Hert » 16 Jun 20 10:19

That's great. The registry.db is a database that contains application settings like screen sizes, the last visited item in the catalog, the last used login name, "say once" messages that you suppressed as "don't show again", and many more.

The file PostCatalogActions.idi is a file with command(s) for PSU to process on startup; for example if an action needs to be performed on a new installation. It's a flat text file and probably empty.

The library folder is not delete on de-installation of PSU.
Try to connect from outside my network.(using VPN)
Three things are important:
1. Security (you already mentioned using VPN, that's good)
2. Route appropriate port from the router to the server (I recommend not using port 5432 when opening ports)
3. Make sure your firewall is configured to accept connections for the configured port
Devise a backup scheme for the server edition.
To get started, do a web search for "postgres automate backup macos".
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Post Reply