5

I am switching work computer and I want to get rid of many local Sitecore instances. I have 30+ instances from 7.0 to 8.2. To find out which Sitecore instances I can safely delete and which ones need a backup, I would like to compare them with their vanilla out of the box state. I would like a report with the additional and modified files, plus the additional/modified Sitecore items.

Is there a free tool to do this?

What I found so far:

  • The Sitecore Config Builder can generate the ShowConfig of a Sitecore instance and download the out of the box one at the same time. I have to manually compare the 2 files. A lot of changes in the configuration are related to the Sitecore instance name. It adds a lot of noise in the comparison.
  • Hedgehog Razl can compare Sitecore database items. However, it is not free. Additionally, I believe I would have to install a vanilla Sitecore instance of each version to have the vanilla databases to compare with.
  • 2
    Hey Jeff. Have you tried Beyond compare? It's not free but you get a 30 day free trial. It is very useful on comparing files. I always use when working on upgrades and have to compare all sorts of files. For sitecore items Razl would be a good call too I agree. – Diego Mar 22 '17 at 14:29
  • 1
    I have Araxis Merge which is similar to Beyond compare. It's a very good tool but it still requires me to install an additional vanilla instance for each Sitecore release I want to compare with just for the comparison job. – Jean-François L'Heureux Mar 22 '17 at 14:44
  • 2
    Beyond compare for files. Razi for Sitecore. – Chris Auer Mar 22 '17 at 14:49
2

TL;DR - No

Ultimately, I believe this is the only answer anyone could offer, given your constraints. But since "no" is such a poor answer, I will try and elaborate on my view.

What is vanilla?

The items in a vanilla instance have no common markers. It's not like e.g. in the Windows File System where files could be marked with the archive bit, which would then be cleared as soon as something was changed on the file.

In short, there is no way to see if a Sitecore item has changed, from the base vanilla install.

That's not entirely true however

You could record all the vanilla Item IDs and Revision numbers, of your Sitecore installation. But these are not available on public record (but I might be getting an idea as I write this) - so there would be no way for you to determine this on your 30+ instances. You would, as a minimum, need to install 1 of each version of Sitecore you have in use to produce the vanilla footprint - and then use some sort of tool to compare this footprint against your instances.

You could use Unicorn

To get around the limitation of needing a commercial tool. But you would still not be able to get around, the need to install vanilla instances as a comparison blueprint.

With Unicorn, how could it be done?

I can outline the idea.

  • Install 1 of each version of Sitecore you have in use
  • Install Unicorn on each
  • Serialize "master" and "web" fully
  • Serialize "core" and "master" fully

You now have your blueprints.

Then proceed to:

  • Install Unicorn on each of your 30+ instances
  • Serialize as above
  • Use a file diff tool to point out differences

But that is a pretty involved process as well.

The fine print

And none of the above actually deals with changed Sitecore file based assets. For this, you could definitely use a common file diff tool - like Beyond Compare or similar.

Edited to fix, which databases would be significant. "web" is largely irrelevant, as that would always be a product of publishing "master".

  • 2
    I also wrote an example of how to use PowerShell to compare two folders. gist.github.com/michaellwest/309c6a49ff3946e984a39242353ebc4e – Michael West Mar 22 '17 at 16:04
  • And if you don't want to set up Unicorn on each machine, you can also use the native "Serialize Tree" functionality in Sitecore and compare the resulting files. And if you really think the data has not changed in the database, you could use a tool like Redgate SQL Compare (not free, but free trial available) – jammykam Mar 22 '17 at 19:46
  • Nice. SQL Comparison tools is an option I did not consider. I did propose Unicorn however, simply for the better serialization format that lends itself more easily to be merged. In this case however, Sitecore default format would be ok though - since we don't need to know WHAT has changed. Only IF something has. – Mark Cassidy Mar 22 '17 at 20:57
4

If you want to spend absolutely zero dollars, you can do the following tooling:

  1. KDiff3: Free comparison tool that has decent file comparison capabilities
  2. Sitecore serialization: Use the built-in developer tab and serialize the whole thing. This takes a long time, but you don't need any other tools.
  3. Sitecore ZIP installers: This will get you the vanilla databases and installation files

The comparison steps basically run as follows:

  1. Install a clean comparison instance
  2. Serialize the clean comparison instance to get the XML Items comparison baseline
  3. Serialize the 'customized' instance to get the 'customized' XML Items
  4. Compare the 'custom' install file base against the clean file base (both serialization folder and Website folder)

This takes an inordinate amount of time, is not efficient, sucks to do, but gets you where you need to be eventually without any dollars into tools.

3

Yes, you can.

There is a tool written by sitecore support available on the bitbucket: https://bitbucket.org/sitecoresupport/sitecore.dbcomparison

As it states in readme:

Sitecore.DbComparison is a command line tool that allows to quickly compare items in two databases.

It works directly with SQL Server and doesn't rely on Sitecore items API. Therefore, it contains almost no overhead and should provide you with the quickest way to perform the items comparison.

The good thing is that it is completely free!

  • But installation of vanilla instances to compare to, would still be required. – Mark Cassidy Mar 23 '17 at 13:33
  • 2
    @MarkCassidy You could attach just the Master database in SQL Server from the Sitecore zipped webroot. It might be slightly quicker, but not much when installing with SIM. Quicker than serialization though. – jammykam Mar 23 '17 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.