How to backup the data on Azure Devops?

Viewed 3696

I would like to schedule (for my company) a backup of our most important data in Azure DevOps, and that, for different reasons : security, urgent recovery required, virus, migration, etc...

I can execute a backup of the repositories and the Wikis (because it's under GIT, so easy to download), but how can do a backup of the "Board" section (Backlogs, Work items, etc...), and the build pipelines definitions?

2 Answers

How to backup the data on Azure Devops?

In current Azure DevOps, there is no out of the box solution to this. You could manually save the project data through below ways:

  • Source code and custom build templates: You can download your files as a zip file. Open ... Repository actions actions for the repository, file, or folder and choose Download as Zip. You can also Download from the right side of the screen to download either all of the files in the currently selected folder, or the currently selected file.

    enter image description here

    This process doesn't save any change history or links to other artifacts.

    If you use Git, clone your repositories to retain the full project history and all the branches.

  • Build data: To save logs and data in your drop build folders, see View build results.

  • Work item tracking data: Create a work item query and open it using Excel. Save the Excel spreadsheet.

    This process doesn't save any attachments, change history, or links to other artifacts.

  • build/release defintions: you could export the json file for them and then import them when restoring them.

    enter image description here

There has been a related user voice, you could monitor and vote up it: https://developercommunity.visualstudio.com/content/idea/365441/provide-a-backup-service-for-visual-studio-team-se.html.

Here are some tickets(ticket1 ,ticket2) with the same issue you can refer to.

If you want to create scheduled tasks, you can write a script by using the Azure CLI with the Azure Devops Extension

As you said, for the repositories, it's quiet easy as they are Git repositories.

I wrote such a script that we could improve to also backup the Workitems, Backlog, etc... It's open source, let me know what you would like to backup first and I'll improve it.

Github : azure-devops-repository-backup

Related