How to backup and restore tables in Azure storage

There is currently no built in solution for backing up tables in Azure Storage, but we can easily do it with the help of a tool called AzCopy which is provided by Microsoft. Below is a PowerShell script I built to simplify the process of backing up and restoring. It’s a two-step rocket: First it enumerates all your tables and saves a CSV-file with their names. Then it uses this file to perform the actual backup (and restore if needed). This way you can easily edit the CSV-file to “configure” what to backup.

This script is also available at my GitHub repo.

 

This entry was posted in Development, Tutorials and tagged , , , , , . Bookmark the permalink.

One Response to How to backup and restore tables in Azure storage

  1. Brian says:

    If you would like an alternate approach to this problem, please look at a package I released on NuGet AzureTableUtilities — https://www.nuget.org/packages/TheByteStuff.AzureTableUtilities/

    You can copy a table to a file or blob file, restore a table from a file or blob file as well as copy to another table on the same account or a different account. Filtering on PartitionKey and Timestamp is also available.

    I also created a reference command line code base and put it on GitHub — https://github.com/TheByteStuff/AzureTableBackupRestore which allows this to be executed from a command line or Docker container.

    Let me know if this doesn’t quite match what you want, and I’ll see if I can enhance the functionality.

Leave a Reply

Your email address will not be published. Required fields are marked *