A more charitably inclined title would probably be "How to change directory paths after migrating DAZ Studio database content to a new Windows computer: a cautionary tale in four acts". (Sorry, Mac people, ain't got no clue about Mac paths, although the general principle should be the same.) After poking at this issue off and on for two days, I am not feeling particularly charitable.
I went into this in the DAZ forum, but I thought I'd put it out here as well, since the search function in the forum is kind of ... not helpful, frequently.
So, for posterity's sake:
To recap: I got a new Windows 7 Pro computer, moved all the PostgreSQL CMS files from the old Appdata directory to the new one, relocated the content, reinstalled Studio, let it reinstall Valentina then stopped it immediately from the Services Manager, downloaded and installed PostgreSQL from the product library ... and PostgreSQL wouldn't start. Not for Studio, not for DIM. I very rarely use Smart Content, so I didn't care on that front. However, if the database isn't running, then Transfer Utility won't function, and I cared a lot about that. So I needed to get that working.
Symptoms of a nonfunctional database include: tried reimporting metadata, but that didn’t work, since Postgres won’t start. Because Studio knew where the support files were, the first steps of the process looked like they might work -- Reimport Metadata gives you a list of all the things it knows about if the content directories are properly mapped in Studio. And then when you click the Start button on that screen, there's a quick blip and it kind of looks like something happened, but nothing did. Tried to have it scan directories for new content; more of the same.
The Studio log file had a profoundly unhelpful message
Creating Asset Manager...
Error connecting to CMS
I could understand if Studio couldn't find things because I relocated the content directory to a new disk, but I looked at the support files and all the paths are relative. It’s literally not possible for Studio to know that the directory is on a different disk as long as the directory structure is maintained below the top level content directory, which it was.
In the C:\users\username\Appdata\Roaming\DAZ 3D
directory where the actual database is (the database itself is in the cms\ContentCluster
subdirectory of that, if you haven't changed anything), there's a dzinstall.ini
file that lists all the paths for things. By default, it appears that if the file exists, the DAZ installers will not alter it or check to see if the paths contained in it have changed, even if you enter new directory information into the Studio and DIM installers. So if you get a new Windows computer, if some of the paths change, the steps need to include:
1. Copy over all the stuff in the C:\users\username\Appdata\Roaming\DAZ 3D
2. After the copy is complete (or before you start, if you remember), go into that directory, find and delete dzinstall.ini
3. Reinstall Studio.
4. Stop Valentina and set it to manual or disabled in the Services Manager (unless you're also using Bryce or Carrara, in which case, skip this step).
4. Start Studio, go into it, and in the preferences, tell it where the database content cluster is. If you've left the main program and installer paths as the default, the Content Cluster directory will be C:\users\username\Appdata\Roaming\DAZ 3D\cms\ContentCluster
. Save and apply preferences.
5. Exit Studio.
6. Install PostgreSQL.
7. Install DIM, if you use it.
8. Check to make sure DIM didn't activate Valentina; it shouldn't now, I don't think, but better to be sure.
9. Start Studio.
10. Have metadata fun! (That is, spend unspecified amounts of time reimporting metadata and processing the metadata queue.)
The alternative to all of that, which is what I had to do to figure it all out, is to let everything happen, then find dzinstall.ini, see all the wrong paths and edit them with a text editor (NOT NOTEPAD! Something that doesn't leave the junk behind that Notepad does!) to see if it works, which it did. I don't know that I recommend this process, exactly, since it caused a great deal of agita
, but it does work.
In the forum, before I'd figured things out, namffuak suggested uninstalling and reinstalling PostgreSQL, starting DIM and checking its log file -- click the gear icon, then 'show log'; scroll to the bottom, and see if this line is present: "Connected to CMS: PostgreSQL 9.3.4, compiled by Visual C++ "
I had checked this, but DIM was also not starting any PostgreSQL processes, since the dzinstall.ini file wasn't telling it where the database was. I'm kind of surprised that it wasn't throwing off error messages or having any issues, but it looks like all DIM needs to be happy is to know where its DSX installer files are and where it's supposed to put things. The database is just the lagniappe, a little something extra that's nice but not actually necessary. (It turns out that, because I don't install to the same directory where the content is -- DIM installs to its default "My DAZ Library", but my content is actually somewhere else entirely, because I like moving things around -- DIM has never started PostgreSQL on my computers. And it doesn't care/matter that it can't. I mean, I'm perfectly fine with that. I guess maybe that sort of workflow was taken into consideration? Who knows?)
In all seriousness, the DAZ PostgreSQL installer really needs either an Advanced mode, or a step where it says, "According to the information I have, this is the directory where your ContentCluster should be". It also needs some sort of quick-detect step where it can say, "OK, this path is wrong. I have checked, and there ain't no contentcluster directory where I'm looking."
Anyway, I hope this may be of use to someone else someday.