Azure 实例更改删除的文件

Azure Instance change deleted files
2021-11-25
  •  译文(汉语)
  •  原文(英语)

我是 Windows Azure 的新手,我使用 6 个月的订阅计划,昨天我的 VM 实例更改了 1 个 VM,我的根文件夹中的文件被删除,我如何恢复这些文件以及如何在不久的将来防止这种情况发生.

解决过程1

Azure PAAS 实例并不打算将任何内容持久存储在本地磁盘上,因为当自动替换实例时,它可能/将定期擦除.

为了获得最佳性能,您可以将文件存储blob 存储中,任何服务器都可以使用您的存储帐户访问这些文件,而不仅仅是一台机器.

如果您确实需要持久性文件存储,则可以将 Blob 存储附加为本地磁盘并将数据存储在那里.请注意,该磁盘一次只能由一个实例访问.

至于更换实例时本地文件系统中存储的文件,除非你有备份,否则我知道没有办法恢复它们.

此链接是有关 Azure各种存储选项的好读物,其中提供了比此空间允许的更多详细信息.

解决过程2

如果您使用的是虚拟机 (IaaS):

  • 添加数据磁盘并将文件存储在那里,而不是在操作系统磁盘上
  • 您有责任自己进行备份

如果您使用的是云服务 (PaaS):

  • 不要将数据存储在机器本身上,仅将其用于缓存、临时数据
  • 添加数据盘并挂载,如果是单台服务器
  • 如果数据来自多个主机,则使用 blob 存储

I am new to windows Azure, I am using 6month subscription plan with 1 VM yesterday instance of my VM changed & my files from root folder are deleted, how can I restore that files and how can I prevennt this in near future.

Solutions1

Azure PAAS instances aren't meant to store anything persistently on local disk since it may/will be wiped regularly when the instances are automatically replaced.

For best performance, you could store the files in blob storage where they can be accessed by any server using your storage account instead of just the single machine.

If you really need persistent file storage, you can attach blob storage as a local disk and store your data there. Note though that the disk will only be accessible by one instance at a time.

As for the files stored on the local file system when the instance was replaced, unless you have a backup, I know of no way to restore them.

This link is a good read regarding various storage options in Azure that gives much more details than this space allows for.

Solutions2

If you are using a virtual machine (IaaS):

  • Add a data disk and store files there, and not on the OS disk
  • You are responsible for making backups yourself

If you are using cloud services (PaaS):

  • Don't store data on the machine itself, use that only for cache, temporary data
  • Add a data disk and mount it, if it's a single server
  • Use blob storage if the data is used from multiple hosts
转载于:https://stackoverflow.com/questions/15240674/azure-instance-change-deleted-files

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入