In this tutorial, you will learn about an essential Umbraco package called uSync. uSync is a free package that is easy to install via Nuget and will greatly improve your deployment process. Once enabled, uSync will back up your Umbraco data. This data can include content, document types, data types, templates, and media file definitions. The reason why this is really cool and you should care is that uSync will provide you with a very easy way of transferring settings and configuration between different environments. Best of all, it is free 💰💰💰 By simply enabling uSync to back up your data, committing the files it generates into source control and then deploying those files into production, your data will be imported into that environment. No more database backup and restores, or content freezes ❤️ If you want to learn how you can get started with uSync, read on 🔥🔥🔥

Installing uSync

Installing uSync takes minutes and can be done via Nuget. In Visual Studio, open your Nuget package manager, type in uSync and you should be presented with this list of options:

How To Back-Up Your Umbraco 7 Data Using uSync and Files 1

I recommend installing uSync and uSync back office. The back office plugin allows you to export and import data within the Umbraco backend. After you have installed the plug-ins and built your solution, open up Umbraco CMS and go to the Developersection:

!How To Back-Up Your Umbraco 7 Data Using uSync and Files 2](http://jondjones.com/images/screenshots/umbracousyncbackoffice.png)

You should see a tab called uSync Backoffice. With this tab, you can configure how uSync backs your data up. I recommend making sure you have the Automatic option set. From this screen, you can also manually import data generated from another Umbraco instance. You can also choose to manually export your sites data to disk. After exporting, within your webroot, you should see a new folder called uSync. It is within this folder that uSync adds all the backup data. Here you will see a list of folders for the various data types that have been saved:

How To Back-Up Your Umbraco 7 Data Using uSync and Files 3

For example, when a document type definition is backed up a JSON file will be generated. The content of the JSON file would look like this:

To import and export data using uSync. Simply add all the content of the uSync folder into source control. The next time you deploy your code, as long as you have uSync installed in your production environment and it is set to automatic, any document types and data that gets deployed in the uSync folder from development will be generated in production 💥Alternatively, you can manually copy any files to your production server that has uSync installed using FTP or something similar, do what makes you happy 😊

Finally, if you want more control over how uSync imports data you can write some custom code and hook into the events handler. All uSync events are fired from Jumoo.uSync.BackOffice.Events. I won't cover how to do this here, but it is handy to note that this type of capability it is possible 🤔


You know now what uSync is and how you can use it to export and import your CMS changes. uSync is a great little utility to back up and sync Umbraco config to disk and back. This is definitely one of my most have packages. I thank the publisher for making it 😊 . Happy Coding 🤘