uSync partial content sync?
# help-with-umbraco
d
We have a running U10 site and now we're turning this into a multisite environment. We have some settings nodes in our content on our testing environment that various mntp editors rely on. I would like to run a uSync import on the production site for just the Umbraco settings, but I need these settings content nodes as well for my mntp editors to keep working. Can this be done?
m
you can manually run content import on the Prod server, but have say only setting import on app start up. You can also choose to just import one item after doing a report.. (or only commit the required content.configs to Prod)
choose content report, open the tree of contents, choose your content click details and click apply (warns about out of sync.. but make sure you have allthe required datatypes/templates and should have no issues)
d
ah, that makes sense. Is this only for content? Because I tried this with settings and it didn't show that option
j
Most settings have cross dependencies to a lot of other things, so probably hard to manage a partial sync
d
Understandable, I think though if I can import content items one-by-one, it should be possible to make it work. I just import the settings, then import as much content that I need as possible and then I can do another settings import if required.
m
import of content without infrastructure degrades nicely. and gives you the errors to correct
j
If you have specific content nodes you need you could just find those usync content files and then remove all other files and do an import
d
Good point, that could work as well
m
I get the same with settings.. with uSync v11.2.1
d
ah, I'm on Umbraco 10 though, so maybe this feature is not available on v10?
m
looks like it..
you might be able to run v11 usync on v10 umb though?
k
you can include and exclude content by path in the config https://docs.jumoo.co.uk/usync/reference/handlers#handler-specific-settings
d
Oooh, that's very promising! There's a bunch of options now that I can try out. Thanks!
m
Been meaning to also find how we can re-set a guid/udi on a content node.. as a dirty hack too..
also MNTP with xpath start node is a nice way to not have concrete guids stored.
same with 404 settings
(but not with content picker etc.. )
d
Yeah, xpath has that benefit, but I've seen that xpath will be deprecated in one of the upcoming versions, so I think it's better to avoid those if possible
m
presume that the funct will be replaced with linq expressions?? 🤞
d
I tried out the option "Include" and "Exclude", by setting the path to the value of the data root node as stored in the path property in the uSync config file, but it might be too strict, since the content report says that it sees 0 changes. I'm gonna try with the property type option now and see if that works better
Can I actually see what kind of changes it's going to make in the content? I created this config:
Copy code
json
"Handlers": {
    "ContentHandler": {
    "GuidNames": true,
    "Settings": {
        "ImportTrashed": false,
        "ExportTrashed": false,
        "CreateOnly": true,
        "RulesOnExport": true,
        "IncludeContentTypes": "commaseparatedlistofcontenttypes"
      }
    }
}
And I ran a report. It says it sees 6/2954 changes. I expect exactly 6 changes, but it doesn't actually say what changes it sees, so I don't know if I can trust what it's going to do. You can see in the screenshot that there is no dropdown or anything. I don't want it to make 2954 changes
Well I tried it out now on a copy of the database and it was all working as expected, so I just did it on production and it all seemed fine. It was incredibly scary though
k
that view should expand out to show you the detail of the changes if you click on it. (but what it really needs is a visual indicator to tell you that!)
d
Well I clicked in various places in an attempt to open it, but nothing was happening. Could be something funky on my end though, I did notice various errors in the devtools
k
the reason we hid it in the latest versions is because when it gets over a 1000 or so items the Angular/JS can get super slow, and laggy. so maybe that combined with some error meant it wasn't showing up in a timly way
2 Views