关于存储位置和文件共享快照成本的一些问题

Some question about the place to store and the cost of Files Share Snapshot

我对 Azure 文件共享快照有一些疑问,如果您对此有所了解,请告诉我。谢谢。

1、快照存储在哪里?是否会消耗存储容量,创建和删除快照的成本如何? 2、如果我的快照超过200张,会是什么?自己删除了还是无法创建新的? 3、我可以通过Azure Automation删除我想要的快照吗(使用runbook来安排)? 4、如果我使用 Azure 自动化和备份(预览)一起部署 Azure FileShare 快照,我会得到哪个快照?

如果你对此有所了解,请与我们分享(即使你能回答其中一个,我也会将其标记为答案)。 非常感谢你的帮助。

只是快速回答你的一些问题(对于其他问题,我会稍后更新)。

有些问题可以找here

1.1 Where are the snapshots stored?

共享快照存储在与文件共享相同的存储帐户中。

1.2 Will it cost the storage capacity

根据此 doc(Space 使用部分)提到:快照不计入您的 5 TB 共享限制。 space 共享快照总共占用多少没有限制。存储帐户限制仍然适用。

这意味着当您创建文件共享时,有一个配额选项可以让您指定文件最大容量(例如 5 GB),如果您的快照总数(例如 10 GB)大于最大容量,别担心,您仍然可以保存这些快照,但总快照容量应小于存储帐户的最大容量。

  1. If my snapshot exceeds 200, what will it be? Deleted by itself or the new one can't be created?

如果超过200,会报错:

"Exception calling "Snapshot" with "0" argument(s): "The remote server returned an error: (409) Conflict.".

您可以使用以下 powershell 代码对其进行测试:

$context = New-AzureStorageContext -StorageAccountName your_accouont_name -StorageAccountKey your_account_key
$share = Get-AzureStorageShare -Context $context -Name s22
for($i=0;$i -le 201;$i++){
$share.snapshot();
start-sleep -Seconds 1
}
  1. May I delete the snapshot which I want by Azure Automation (use the runbook to schedules it)?

这个应该是可以的,待会我这边测试一下再更新给大家

并且大部分快照操作命令都可以找到here,包括删除。

更新:

$s =  Get-AzureStorageShare -Context $context -SnapshotTime 2018-12-17T06:05:38.0000000Z -Name s33    
$s.Delete() #delete the snapshot

注:

对于-SnapshotTime,您可以将快照名称传递给它。截至目前,快照名称始终自动分配 UTC 时间值,如 2018-12-17T06:05:38.0000000Z

对于 -Name,传递 azure 文件共享名称