Azure表存储增量备份到Azure存储Blob [英] Azure Table Storage Incremental backup to Azure Storage Blob

查看:130
本文介绍了Azure表存储增量备份到Azure存储Blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以将Azure表存储备份到Azure Blob增量方式中. AZcopy提供了针对表的完整备份而不是增量备份的解决方案.

Is there any way I can do Azure Table Storage backup in to Azure Blob incremental way. AZcopy has solution for full backup for the table but not incremental.

如果我从Azure存储资源管理器中删除Azure存储表,有什么方法可以恢复它?

Is there any way I can recover Azure storage table, If I delete it from Azure storage explorer?

推荐答案

我们编写了一个. .NET库备份表和Blob.您可以在azure函数计时器触发器中轻松实现此功能.

We wrote a .NET library that backups tables and blobs. You can easily implement this in an azure function timer trigger.

在此博客,我将说明如何使用Azure函数来实现它.

In this blog I explain how to implement it using an Azure function.

[FunctionName("Function1")]
public static async Task Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, ILogger log, ExecutionContext context)
{
  var sourceAccountName = Environment.GetEnvironmentVariable("BackupSourceAccountName");
  var sourceKey = Environment.GetEnvironmentVariable("BackupSourceAccountKey");

  var backupAzureStorage = new Luminis.AzureStorageBackup.BackupAzureStorage(sourceAccountName, sourceKey, log, context.FunctionAppDirectory);

  var destinationAccountName = Environment.GetEnvironmentVariable("BackupDestinationAccountName");
  var destinationKey = Environment.GetEnvironmentVariable("BackupDestinationAccountKey");
  var destinationContainerName = Environment.GetEnvironmentVariable("BackupDestinationContainer");

  // Backup Tables
  await backupAzureStorage.BackupAzureTablesToBlobStorage("table1,table2", destinationAccountName, destinationKey, destinationContainerName, "tables");

  // Backup Blobs
  await backupAzureStorage.BackupBlobStorage("container1,container2", destinationAccountName, destinationKey, destinationContainerName, "blobs");
}

这篇关于Azure表存储增量备份到Azure存储Blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆