Introduction

At the time I started working with Sitecore in 2013, Hedgehog TDS was already used on the project, so there was no question what to use for Sitecore content migration and for Sitecore items source control tracking. Going forward TDS had been used on my projects until 2017, as a product with no alternative - although it had problems with performance, not very well designed file format (everybody hated merging *.item files with content-length and *.csproj files - it was easier to set up the content manually again in most cases).

And when Unicorn came into the developer’s life, it was really a breath of fresh air. Free, open source, fast, with annoying plug-in required for Visual Studio (and Visual Studio isn’t required at all), worked well with Helix, it was much easier to resolve conflicts - that’s what every Sitecore developer wanted. And from that point, no more greenfield project started without Unicorn in my practice.

The problem

During the time I was working with Sitecore I hadn’t heard about a stable and reliable tool for Content Migration for the big size items - of course, I’m talking about media items. Sitecore media items are stored and processed quite straightly - Sitecore is not designed to serve as a DAM system.

I needed to migrate media items from one database to several Azure environments. The total size was more than 15GB, the number of files was more than 30000. It was a one-time job, so I got the master DB backup, added unicorn configuration and voila - I had all the media items serialized in several hours - Unicorn did the initial serialization with no issues.

Then the files were added for uploading to Azure Storage Explorer.

Implementation

The main idea was to make the data store work with the same file structure that Rainbow’s SerializationFileSystemDataStore works with.

The following adjustments were done:

  • Added Azure BLOB Provider that is implemented similarly to the way Rainbow works with files.
  • Change functionality is not implemented. My task didn’t require changes support.
  • Added useBlobListCache option. The Rainbow file system implementation uses file and directory list access a lot. To reduce the number of network requests it caches the list one time and does not make more requests.

The source code: https://github.com/fpodshivadlov/Rainbow.Storage.AzureBlob The Rainbow Azure Blob Storage is published to NuGet: https://www.nuget.org/packages/Rainbow.Storage.AzureBlob