Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dimitris Chrysomallis 23 posts 137 karma points
    Oct 13, 2017 @ 09:07
    Dimitris Chrysomallis
    0

    Request configuration for only importing content from Production to Development machine

    Could you please suggest a configuration that will enable the following scenario:

    • Exporting development changes to production (no content export).
    • Importing only content from production to development (only content import).

    Thank you

    Umbraco 7.6.6, uSync.BackOffice 4.0.0.760, uSync.Core 6.0.0.760, uSync.Content: 4.0.0.760

  • Kevin Jump 1769 posts 11367 karma points MVP 4x c-trib
    Oct 13, 2017 @ 09:22
    Kevin Jump
    101

    Hello,

    you can control this just by what folders you choose to copy between sites (so copy all but /data/content /data/media to live and only copy those folders back from live)

    but if you want to/can only have the whole usync folder copied between sites I would suggest you use Hander Groups within the usyncbackoffice.config (see http://usync.readthedocs.io/handler-config/)

    With that you can setup the handlers to do what you need, (see below) and then the only diffrence between live and production will be the group value.

    (all the below settings are in /config/usyncbackoffice.config and would probibly need some tweaking to your exact needs. )

    Import Dev Changes to Live (but not content).

      <Handlers Group="ConfigImport" EnableMissing="false">
        <HandlerConfig Name="uSync: DataTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: TemplateHandler" Enabled="true" />
    
        <HandlerConfig Name="uSync: ContentTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MediaTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: LanguageHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DictionaryHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MacroHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DataTypeMappingHandler" Enabled="true" />
    
        <HandlerConfig Name="uSync: ContentHandler" Enabled="true" Actions="Events, Export"/>
        <HandlerConfig Name="uSync: MediaHandler" Enabled="true" Actions="Events, Export"/>
      </Handlers>
    

    This handler group would enable all the config stuff but only enable the saving of things to disk for Content and Media (meaning they never get imported).

    *import just the content (live to dev) *

      <Handlers Group="ContentImport" EnableMissing="false">
        <HandlerConfig Name="uSync: DataTypeHandler" Enabled="true"  />
        <HandlerConfig Name="uSync: TemplateHandler" Enabled="true" />
        <HandlerConfig Name="uSync: ContentTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MediaTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: LanguageHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DictionaryHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MacroHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DataTypeMappingHandler" Enabled="true" />
    
        <HandlerConfig Name="uSync: ContentHandler" Enabled="true" Actions="Import/>
        <HandlerConfig Name="uSync: MediaHandler" Enabled="true" Actions="Import"/>
      </Handlers>
    

    then on live

    <HandlerGroup>ConfigImport</HandlerGroup>
    

    and dev

      <HandlerGroup>ContentImport</HandlerGroup>
    

    I wouldn't turn off the actual import of config on dev, because you will want that for source control (so you might have multiple devs making changes, you will want that to be reflected on all developers pcs.

  • Dimitris Chrysomallis 23 posts 137 karma points
    Oct 13, 2017 @ 10:27
    Dimitris Chrysomallis
    0

    Worked like a charm!

    I have worked with other CMS systems before, but I have to say the Umbraco ecosystem, the community and the developer experience are next to none, AFAIC.

    Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft