Copied to clipboard

Flag this post as spam?

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


  • Joost Broekhuizen 13 posts 33 karma points
    Feb 22, 2022 @ 15:38
    Joost Broekhuizen
    0

    Usync media export / import from Azure blob

    I am using uSync on Umbraco 9 to sync content from local development to hosted Azure PaaS. This works fine, but now I am interested in moving content from a hosted Test environment to a Hosted Pre-Production environment. For media I am using AzureBlob container as filesystem.

    When using usync export I do see all the config files pointing to media in the export folder, but what would be the recommended way to not only get these export configs, but also the actual media items exported so that I can import them on a new environment (I want to avoid having to manually copy from blob container to blob container, I'd prefer a packaged in sync approach).

    Is this supported, and if so how do I do this?

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Feb 22, 2022 @ 16:08
    Kevin Jump
    0

    Hi

    there can be some small nuances in blob container setup but genrially if you make sure the 'Include Media Files' check box is ticked

    enter image description here

    then the resulting sync-pack should include the actual media

    (if you open in in zip package - you can see a uSync and a Media folder?) enter image description here

    importing this to the target site should then put the media in the right location (including on azure blobs).

    if this is working its a bug 😞- but we have seen some oddidies when using subfolders in azure blobs so it might be a bit of config needs tweaking.

  • Joost Broekhuizen 13 posts 33 karma points
    Feb 23, 2022 @ 09:01
    Joost Broekhuizen
    0

    Thnx, it seemed I was not using usync.Complete but only some subpackages, so I was just missing a few functionalities.

  • Arnaldo Parker 7 posts 78 karma points
    Feb 24, 2022 @ 11:07
    Arnaldo Parker
    0

    When using the azure file provider, if you do not use the default root for media

    e.g

    Then media is stored within Umbraco using the container name, (not /media)

    So you see the container name in the export :

      <Value><![CDATA[{"src":"/container-name/fldloown/firefine.gif","crops":null}]]></Value>
    

    It is likely that any site you are importing to will have a diffrent container name, so will want the import to go to a diffrent location.

    Ideally, content should be exported to a generic path e.g /media/something/image.png and then at import time the folder name put over the top of it.

    staplesadvantage.com

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Feb 24, 2022 @ 12:21
    Kevin Jump
    0

    Hi

    there is a setting for that (in v8) adding this to the web.config shoud replace the /container-name with /media when exporting. and it replaces /mediawith /container-name when importing.

    <add key="uSync.mediaFolder" value="/container-name" /> 
    

    see (https://github.com/KevinJump/uSync/issues/128)

    this is something that isn't yet supported in v9 - i think we where waiting for the v9 azure provider, but now thats live we should go back and impliment this.


    In v8 we also try and guess this value for Azure blob storage but its not always easy ( https://github.com/KevinJump/uSync/blob/v8/main/uSync8.ContentEdition/Extensions/MediaFolderExtensions.cs#L24-L64 )

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Feb 24, 2022 @ 12:34
    Kevin Jump
    0

    Actually i am not actually sure if this is an issue in v9 as the blob provider works differently, and the container is always expected to have a /media folder ???

    https://github.com/umbraco/Umbraco.StorageProviders#umbracostorageproviders

    if you or anyone has a different configuration than this , i would love to have a look so we can provide any settings that would be needed ?

Please Sign in or register to post replies

Write your reply to:

Draft