Azure DevOps – Get a local backup of your code repositories

Why get a local backup of your code repositories?

Getting a local backup of your code repositories stored in Azure DevOps (or othat places) is a good practice, to ensure that you have a copy of your code that is readily accessible in case of any unforeseen issues with your cloud-based repository. Here are some reasons why you should consider getting a local backup:

  1. Disaster Recovery: In the event of a disaster such as a natural calamity or a cyber attack, having a local backup of your code repositories ensures that you have a copy of your code that can be quickly restored to minimize downtime.
  2. Compliance Requirements: Some organizations may have compliance requirements that mandate keeping a local backup of their code repositories. Having a local backup helps meet these compliance requirements and ensures that you are not exposed to any legal or regulatory issues.
  3. Version Control: While Azure DevOps offers robust version control capabilities like GitHub etc., having a local backup of your code repositories gives you an added layer of control over versioning. This is particularly useful if you want to maintain a version history that is separate from your cloud-based repository.
  4. Offline Access: If you or your team members work in an environment with limited or no internet connectivity, having a local backup of your code repositories ensures that you can continue to work offline and still have access to your code.

Overall, having a local backup of your code repositories stored in Azure DevOps provides added security, compliance, and accessibility benefits that are worth considering.

Why do I make a local backup of my code repositories in Azure DevOps

Year, i do it o I do it because I have a small server setup at home as an “IT Pro”, and thought it would be fun and educational to make such a tool.

I am NOT a trained programmer myself 🤪 so there is definitely something here that could be done smarter and faster – but I have managed to get this done as it is in my spare time and with the knowledge I have learned over time – and what count is: Learn every day and do something good!

How the tool is created and why

Using a Windows console application to do automation with arguments and task scheduler etc. offers several advantages over other approaches. Here are some reasons why you might consider using a console application for automation (in this case, else PowerShell is fine to 🤪😉):

  1. Customization: A console application can be tailored to perform a specific task, allowing for greater customization and control over the automation process. You can pass arguments to the console application to configure its behavior, allowing you to fine-tune the automation process to meet your specific needs and features you need/have iders about like me 🤓
  2. Flexibility: A console application can be scheduled to run at specific times or intervals using the Windows Task Scheduler. This allows you to automate tasks on a regular basis without requiring manual intervention.
  3. Ease of Use: Console applications are relatively easy to create and use. They can be built using simple programming languages such as C# like this, and can be executed from the command line or via a batch file.
    But sure, you need to right tool to create it like the Visual Studio Community Edition IDE from Miccrosoft.
    This makes it easy to automate complex tasks that would otherwise be time-consuming or error-prone to perform manually.
  4. Debugging: Console applications provide a rich set of debugging tools that can be used to troubleshoot issues that arise during automation. This can save significant time and effort compared to other approaches that may not offer the same level of debugging support.
  5. Portability: Console applications can be easily moved and executed on different machines, making them a portable solution for automation. This can be particularly useful in scenarios where automation needs to be performed across multiple machines or environments.

Overall, using a Windows console application for automation with arguments and task scheduler offers flexibility, customization, ease of use, debugging support, and portability benefits that make it a great choice for automating tasks on a Windows machine.

The tool itself and how to use it

Abot the tool, there is all the information needed here direct from the public GitHuh code here, with all the needed information – if you think something is missen, let me know!

(Then it allways up to date here is this blog!)

Where to download

You can downlaod it for public releases:

The tool and installer is digital signed with my Code Sign certificate from Sectigo!

N.B.: live sync from my Azure DevOps to Github, as job is done from my side in Azure DevOps!

If you have a nice idear how to make it smarter and automated, let me know!


Here is the full changelog embedde from the GitHub repo to, so its alltime up to date:

Previous Article

Break Glass account - and how to get notified when a Break Glass account is used

Next Article

Azure AD Admin and use of PIM Email forwarding for your admin accounts notifications

Related Posts