How to restore or backup Categories?

mikethe3dguymikethe3dguy Posts: 515

So I had a weird problem where postgre was not connecting and I was missing my custom content categories. The postgre thing is now fixed - it looks like some Windows error or update caused that, plus a few other problems I discovered as I tried to correct the DS problem.

But now that postgre is fixed I'm still missing my categories! Very distressing considering how much work went into creating them. Can anyone tell me how I could possibly restore them? There's a thread on here describing a process for this... but it's 10 years old and I'm not sure it's still valid. Failing that how can I back up categories to avoid this problem in the future?

Thanks

Post edited by mikethe3dguy on
«1

Comments

  • SofaCitizenSofaCitizen Posts: 1,869

    To backup the current categories hit the little hamburger icon in the top right of Smart Content, Hit Content DB Maintenance, Select Export UserData and click Accept. That should write out a file to the /Runtime/Support folder of your primary Library.

    How did you manage to fix your Database but not restore your custom categories tho? Surely if you wiped the database your Smart Content would be completely empty but if you brought it back up intact your custom changes should still be there?

  • SofaCitizen said:

    To backup the current categories hit the little hamburger icon in the top right of Smart Content, Hit Content DB Maintenance, Select Export UserData and click Accept. That should write out a file to the /Runtime/Support folder of your primary Library.

    How did you manage to fix your Database but not restore your custom categories tho? Surely if you wiped the database your Smart Content would be completely empty but if you brought it back up intact your custom changes should still be there?

    I don't use Smart Content, haven't ever used it. I'm talking about the categories in the normal Content Library.

  • SofaCitizenSofaCitizen Posts: 1,869

    mikethe3dguy said:

    I don't use Smart Content, haven't ever used it. I'm talking about the categories in the normal Content Library.

    Oh, I have no idea what you mean then - my Content Library tab only shows Folder & File structure of where the files are physically located. Hopefully someone else will be able to help you.

  • There is only one set of categories - Smart Content, the various Presets tabs, and the Categories container in the Content Library are all drawing from the same source though all but the last named are filtered by one or more factor.

  • PendraiaPendraia Posts: 3,598
    edited October 2022

    I'm assuming you mean your custom categories in the category view? 

    Did you ever export your user data? Because if so you can reimport it. See the image below.

    If you click on the arrow with lines top right hand corner of the content tab you can access the content database maintenance in the image below.

     

    content database maintenance copy.jpg
    1605 x 939 - 222K
    Post edited by Pendraia on
  • NorthOf45NorthOf45 Posts: 5,480

    mikethe3dguy said:

    SofaCitizen said:

    To backup the current categories hit the little hamburger icon in the top right of Smart Content, Hit Content DB Maintenance, Select Export UserData and click Accept. That should write out a file to the /Runtime/Support folder of your primary Library.

    How did you manage to fix your Database but not restore your custom categories tho? Surely if you wiped the database your Smart Content would be completely empty but if you brought it back up intact your custom changes should still be there?

    I don't use Smart Content, haven't ever used it. I'm talking about the categories in the normal Content Library.

    Do you have any Default categories? Those are created from the metadata in the product packages when you install them. Did you create your Custom Categories mixed in with the Default, or in a separate tree? Go to a content library folder with assets (not just subfolders) and edit the metadata. It should show which categories each asset belongs to, default and custom, among other things.

  • mikethe3dguymikethe3dguy Posts: 515
    edited October 2022

    Pendraia said:

    I'm assuming you mean your custom categories in the category view? 

    Did you ever export your user data? Because if so you can reimport it. See the image below.

    If you click on the arrow with lines top right hand corner of the content tab you can access the content database maintenance in the image below.
     

    Yes that's exactly what I mean. I never exported my user data. Didn't even know about it.

    Post edited by mikethe3dguy on
  • Richard Haseltine said:

    There is only one set of categories - Smart Content, the various Presets tabs, and the Categories container in the Content Library are all drawing from the same source though all but the last named are filtered by one or more factor.

    I don't know what you mean or what the relevance is, of "are filtered by one or more factor".

  • NorthOf45 said:

    Do you have any Default categories? Those are created from the metadata in the product packages when you install them. Did you create your Custom Categories mixed in with the Default, or in a separate tree? Go to a content library folder with assets (not just subfolders) and edit the metadata. It should show which categories each asset belongs to, default and custom, among other things.

    The Default categories are there. Most of the folders are empty, but not all. Was never sure what use that whole section was. I'm assuming it would be useful if content creators were diligent in how they categorize their products.

    I created a sub-category just called "Content" under the Categories folder, and everything was in there. So a separate tree. I definitely did not mix it into the Default tree. Are you saying that if my custom categories still exist, then the "edit metadata" (Content DB Editor) view should show them, for products I copied there? Unless I'm misunderstanding you?

     

    Content DB Editor.png
    1370 x 728 - 133K
  • NorthOf45NorthOf45 Posts: 5,480

    mikethe3dguy said:

    NorthOf45 said:

    Do you have any Default categories? Those are created from the metadata in the product packages when you install them. Did you create your Custom Categories mixed in with the Default, or in a separate tree? Go to a content library folder with assets (not just subfolders) and edit the metadata. It should show which categories each asset belongs to, default and custom, among other things.

    The Default categories are there. Most of the folders are empty, but not all. Was never sure what use that whole section was. I'm assuming it would be useful if content creators were diligent in how they categorize their products.

    Most are empty? Not a good sign. Those categories are assigned by DAZ, who are 100% responsible for the metadata, not the product's creator(s).

    I created a sub-category just called "Content" under the Categories folder, and everything was in there. So a separate tree. I definitely did not mix it into the Default tree. Are you saying that if my custom categories still exist, then the "edit metadata" (Content DB Editor) view should show them, for products I copied there? Unless I'm misunderstanding you?

    You did not misunderstand. Whatever you had placed in the custom categories would show.

  • NorthOf45NorthOf45 Posts: 5,480

    Exactly what did you do to correct the PostgreSQL CMS problem? Is it possible that you created a new, different database?

  • NorthOf45 said:

    Exactly what did you do to correct the PostgreSQL CMS problem? Is it possible that you created a new, different database?

    No one in the technical forums seemed to have any idea how to help me. Postgre was not connecting and my custom Category tree was gone. But then I tried to open a Windows command prompt for some reason (don't recall)... and it didn't open! I even went into the System32 folder and double-clicked the cmd executable directly... nothing. That's when I realized something more than just a DS problem was going on. I ran Malware Bytes, which found next to nothing. Finally I reset back to a Windows restore point from 2-3 weeks ago. That corrected the command prompt problem and the postgre connection started working, but my custom Categories were still missing.

  • PendraiaPendraia Posts: 3,598

    Can you check if you have a file called userdata in your installation of Daz Studio?

  • mikethe3dguymikethe3dguy Posts: 515
    edited October 2022

    Pendraia said:

    Can you check if you have a file called userdata in your installation of Daz Studio?

    I have a UserData_PublicBuild_1.dsx file at My DAZ 3D Library\Runtime\Support but its "last modified" date is in 2018. I originally created my custom Categories sometime in Feb. or March of this year, and last modified it probably as recently as 3-4 weeks ago.

    Post edited by mikethe3dguy on
  • PendraiaPendraia Posts: 3,598

    Damn...I'm in a similar position as I'm currently recategorising everything. It takes a lot of time when you have a lot of content. 

     

  • NorthOf45NorthOf45 Posts: 5,480

    There are a couple of users who have had some success connecting to the database outside of Studio to see just what it contains (I am not one of them, and I cannot recall who they were). Apparently it comes with the basic tools to do that, so maybe one of them will drop by to explain.

     

  • mikethe3dguy said:

    Richard Haseltine said:

    There is only one set of categories - Smart Content, the various Presets tabs, and the Categories container in the Content Library are all drawing from the same source though all but the last named are filtered by one or more factor.

    I don't know what you mean or what the relevance is, of "are filtered by one or more factor".

    Just trying to avoid confusion over categories/Smart Content which might have made it harder to sort out what was happening.

  • Do you make back-ups? By default the database is in the Appdata / Application Support folder ( %appdata%/daz 3d/cms/ for Windows - the Content Cluster folder).

  • NorthOf45NorthOf45 Posts: 5,480

    mikethe3dguy said:

    NorthOf45 said:

    Exactly what did you do to correct the PostgreSQL CMS problem? Is it possible that you created a new, different database?

    No one in the technical forums seemed to have any idea how to help me. Postgre was not connecting and my custom Category tree was gone. But then I tried to open a Windows command prompt for some reason (don't recall)... and it didn't open! I even went into the System32 folder and double-clicked the cmd executable directly... nothing. That's when I realized something more than just a DS problem was going on. I ran Malware Bytes, which found next to nothing. Finally I reset back to a Windows restore point from 2-3 weeks ago. That corrected the command prompt problem and the postgre connection started working, but my custom Categories were still missing.

    Okay, so in your Content Library folders, do you see the Content Type flashes in the upper right corner of the asset's icon (Prop, Material(s), Actor, etc.)? If not, maybe your CMS isn't actually running. I have had that happen a couple of times while installing new products, and was perplexed when none of the assets had any metadata. Studio did not complain of a failed connection, it just wasn't running. Turn it on in DIM or in Studio (Content Library tab, right-click or use the context (hamburger) menu -> Start CMS).

  • mikethe3dguymikethe3dguy Posts: 515
    edited October 2022

    NorthOf45 said:

    Okay, so in your Content Library folders, do you see the Content Type flashes in the upper right corner of the asset's icon (Prop, Material(s), Actor, etc.)? If not, maybe your CMS isn't actually running. I have had that happen a couple of times while installing new products, and was perplexed when none of the assets had any metadata. Studio did not complain of a failed connection, it just wasn't running. Turn it on in DIM or in Studio (Content Library tab, right-click or use the context (hamburger) menu -> Start CMS).

    Not sure what you mean by "Content Type flashes" but when I open DIM it knows what's been installed, and there are multiple iterations of PostgreSQL Server running in Processes. If I open the Smart Content tab and select "Stop CMS" from the menu, all the content there disappears, then reappears when I click "Start CMS".

    Post edited by mikethe3dguy on
  • NorthOf45NorthOf45 Posts: 5,480
    edited October 2022

    So DIM knows CMS is running, but does Studio, and does it see anything? Content Type comes from the metadata in the database (see attached)

    ETA: Sorry, I saw "DIM" and stopped there. Obviously Studio sees the database. Do you see the Content Type on the assets?

    Content Type indications.jpg
    489 x 547 - 136K
    Post edited by NorthOf45 on
  • NorthOf45 said:

    So DIM knows CMS is running, but does Studio, and does it see anything? Content Type comes from the metadata in the database (see attached)

    ETA: Sorry, I saw "DIM" and stopped there. Obviously Studio sees the database. Do you see the Content Type on the assets?

    Oh yes, now I know what you mean : yes, I see the content type.

  • NorthOf45NorthOf45 Posts: 5,480

    ...but no custom categories? Sounds like they are gone with the wind.

    Maybe there is still something in there. Try Exporting User Data and see what it spits out. As Pendraia said, that will create a new UserData file or three (I'm up to 13!) in the Runtime/Support folder. You can edit those to see what's available (you'll need a robust editor, those UserData files top out at about 30 MB).

  • mikethe3dguymikethe3dguy Posts: 515
    edited October 2022

    NorthOf45 said:

    ...but no custom categories? Sounds like they are gone with the wind.

    Maybe there is still something in there. Try Exporting User Data and see what it spits out. As Pendraia said, that will create a new UserData file or three (I'm up to 13!) in the Runtime/Support folder. You can edit those to see what's available (you'll need a robust editor, those UserData files top out at about 30 MB).

    At this point I've accepted that they're GONE. But I did as you suggest and generated a UserData file. Opened it in WordPad and seached for some strings that were present in my custom categories: no bueno. Oh well, live and learn. Fortunately I found (in my recycle bin) the custom category tree I'd created in Word months ago before I sorted everything. Gonna be a lot of work, but at least I have my road map. And job #1 after I'm finished is to save it!

    Post edited by mikethe3dguy on
  • NorthOf45NorthOf45 Posts: 5,480

    Don't wait until you are finished, export it every week, or more, if you like.

    I took the plunge a long time ago to categorize everything after one more particularly frustrating session searching the rat's nest of a folder structure that had built up over the years. After having slogged through most of it, I realized a quicker way to get started, I think (never tried it, though). Categorize the whole library, DS and Poser formats, in one shot into a temporary category tree, then move things around after. Your custom categories can easily be moved, copied, or deleted at will without affecting the installed files. That way you don't miss anything, then you can sort it all out as you go along. Make another category tree, the one you'll use in the future, and move things in the way you want. When the temporary one is clear, you're done. Add new acquisitions as you install them, and backup, backup, backup.

  • mikethe3dguymikethe3dguy Posts: 515
    edited October 2022

    NorthOf45 said:

    Don't wait until you are finished, export it every week, or more, if you like.

    I took the plunge a long time ago to categorize everything after one more particularly frustrating session searching the rat's nest of a folder structure that had built up over the years. After having slogged through most of it, I realized a quicker way to get started, I think (never tried it, though). Categorize the whole library, DS and Poser formats, in one shot into a temporary category tree, then move things around after. Your custom categories can easily be moved, copied, or deleted at will without affecting the installed files. That way you don't miss anything, then you can sort it all out as you go along. Make another category tree, the one you'll use in the future, and move things in the way you want. When the temporary one is clear, you're done. Add new acquisitions as you install them, and backup, backup, backup.

    So now I've got a super-weird Categories problem trying to re-create this. I added a new sub-category under Categories called "Custom Library" and built my organization tree from there. Now (using Create a Category from) almost NONE of the content I add to these new folders is showing up! All the folders and sub-folders appear, no problem. But except for a couple isolated cases so far, the products aren't there! Any idea?

    I did have problems like this with some content before, but it appears to be 90% or more now (so far anyway) that isn't appearing.

    Post edited by mikethe3dguy on
  • NorthOf45NorthOf45 Posts: 5,480
    edited October 2022

    Sounds like the database is messed up with bad references. You are probably just refreshing the bad data by re-categorizing. Too bad it can't be recovered, as far as I know. If you are going to do your categorization from scratch, I suggest maybe resetting the database, and re-importing the metadata. This will restore all the metadata from the Manifest Archive (all the installed stuff). Then try adding a few custom categories to see if they show up.

    Re-importing gives you the option to include the UserData, which at this point is useless, it seems, so leave those out, if there are any.

    ETA: Yes, this is the nuclear option...

    Post edited by NorthOf45 on
  • NorthOf45 said:

    Sounds like the database is messed up with bad references. You are probably just refreshing the bad data by re-categorizing. Too bad it can't be recovered, as far as I know. If you are going to do your categorization from scratch, I suggest maybe resetting the database, and re-importing the metadata. This will restore all the metadata from the Manifest Archive (all the installed stuff). Then try adding a few custom categories to see if they show up.

    Re-importing gives you the option to include the UserData, which at this point is useless, it seems, so leave those out, if there are any.

    ETA: Yes, this is the nuclear option...

    Doesn't "reset database" require re-installing EVERYTHING... I mean: all content? How do you re-import metadata other than re-installing the content? Unless that's what you meant.

  • mikethe3dguy said:

    NorthOf45 said:

    Sounds like the database is messed up with bad references. You are probably just refreshing the bad data by re-categorizing. Too bad it can't be recovered, as far as I know. If you are going to do your categorization from scratch, I suggest maybe resetting the database, and re-importing the metadata. This will restore all the metadata from the Manifest Archive (all the installed stuff). Then try adding a few custom categories to see if they show up.

    Re-importing gives you the option to include the UserData, which at this point is useless, it seems, so leave those out, if there are any.

    ETA: Yes, this is the nuclear option...

    Doesn't "reset database" require re-installing EVERYTHING... I mean: all content? How do you re-import metadata other than re-installing the content? Unless that's what you meant.

    It depends how you install - through Daz Studio yes, a reset will wipe all reference to the products (though on reinstalling it should notice that the files are there and just validate them without redownloading) but through Install manager or Central no, the metadata fils are still there and can be read in with the reimport Metadata command in the same Content DB maintenance dialogue as the reset command.

  • jjoynerjjoyner Posts: 616

    Over the past few weeks, I’ve been trying to get better organization of the categories for my installed content.  Some products install and create a new category for its content and sometimes the category will contain many items and sometimes just one or two.  Wherever possible, I’m trying to simplify the category structure.  For example, I have no need for an apron to be categorized as  Wardrobe – Outerwear – Tops – Apron.  A categorization of simply Wardrobe is fine for me.

    For some content, I can change and simplify the categorization in Smart Content.  In many instances, though, when I change the categorization, the item keeps the old categorization as well.  For example, changing an item’s categorization from Environment – Office – Desk to simply Prop may result in the item now being an Environment and a Prop instead of just a Prop.  I know that I can delete a Category and I have done that for content that only has items from one product and then categorized the items as I wish.

    Other than deleting a category (some have hundreds of items from many products), is there a way to change an item’s category such as in my desk example so that it only appears in one categorization?

Sign In or Register to comment.