必须有正确的方法来执行Azure SQL数据库备份吗? [英] There MUST be a right way to do Azure SQL database backups?

查看:68
本文介绍了必须有正确的方法来执行Azure SQL数据库备份吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

这是一个简单的问题,但我似乎找不到确切的答案.我似乎在网上发现的所有信息要么含糊不清,要么用行话淹没,要么过时,要么矛盾.

Its a simple question, but I don't seem to be able to find a definitive answer. All the information I seem to find online is either vague, steeped in jargon, out of date, or contradictory.

因此,我有一个包含/链接到SQL数据库的SQL Server.数据库具有一堆包含数据的表.我的应用程序可以读取/写入该数据.一切都很好.

So, I have an SQL Server which contains / is linked to an SQL Database. The database has a bunch of tables which contain data. My application can read / write that data. All good.

现在...我知道Azure可以进行时间点备份,可以从中进行备份.那行得通.

Now... I understand that Azure takes point in time backups which I can restore from. That works.

我还了解到我可以将Azure配置为保留备份更长的时间.

I also understand that i can configure Azure to retain backups for longer periods.

但是,两个时间点"均不相同.和长期"备份似乎是通过SQL Server访问的.因此,我的假设是,如果删除/删除了SQL Server,我会丢失那些备份吗?

But both the "point in time" and "longer term" backups seemed to be accessed via the SQL server. My assumption is therefore if the SQL server is removed / deleted I will lose those backups?

我要查找的是如何保留数据库的备份,即使必须完全删除并重新创建SQL Server和数据库,该备份也将保留.在这种情况下,我仍然希望能够重新创建SQL Server并从中还原 备份(例如,我也可以使用该备份将Live数据库的副本还原到Q/A环境中.)

What I'm trying to find out is how do I retain a backup of the database which will persist even if I had to entirely remove and recreate the SQL server and database. In that situation I would still like to be able to recreate the SQL server and restore from the backup (I could also use that backup to restore a copy of the Live database into a Q/A environment for example).

我读过的所有内容似乎都假定SQL Server始终存在...但是如果没有,该怎么办?

Everything I've read seems to assume that the SQL server is always there... but what if it isn't?

现在,我找到了一种方法-将数据库导出到BACPAC文件.借助BACPAC的备份"功能,创建后,我可以删除整个SQL Server/数据库,然后重新创建并还原-确实可以.但这是唯一/最好的方法吗?

Now, I have found a way - and that is to EXPORT the database to a BACPAC file. With a BACPAC "backup" created I can then delete the entire SQL server / database, recreate it and restore - that does work. But is that the only / best way?

我之所以在这个论坛上发帖是因为我假设有人必须这样做并且可以指出最佳实践是什么.

I'm posting to this forum because I'm assuming that somebody MUST have done this and can indicate what best practice is.

此外,如果BACPAC解决方案是正确的答案-是否有任何陷阱或需要注意的事情?

Also, if the BACPAC solution IS the right answer - are there any gotchas or things to watch out for?

任何信息,建议等都将不胜感激.

Any information, suggestions etc would be gratefully received.

最诚挚的问候!

推荐答案

Hello,

Regarding the scenario when you delete a database, you can restore a deleted database as explained below:

https://docs.microsoft.com/zh-CN/azure/sql-database/sql-database-recovery-using-backups#deleted-database-restore

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-recovery-using-backups#deleted-database-restore


On the scenario when you delete a logical Azure SQL server even with no long-term backups made, no bacpacs made, even with that scenario you can call Azure support and create a ticket. I know of cases when Azure Support have recovered a full server after 4 days the deletion accidentally occurred,  


I don’t know if you have knowledge about the possibility of using locks on Azure resources.

https://praveenkumarsreeram.com/2017/10/21/azure-resource-locks-to-avoid-accidental-deletes/  

https://praveenkumarsreeram.com/2017/10/21/azure-resource-locks-to-avoid-accidental-deletes/  

访问控制IAM .


With Azure SQL Database you have more than backups to recover from a disaster, You have options to prevent a disaster other than resource locks, you have Access Control IAM.

地理还原 您可以对备份进行地理复制,并在任何区域还原它们,以防出现以下情况:整个数据中心都有问题.


About backups, you have another option, geo-restore. With geo-restore you can geo-replicate backups and restore them on any region in case a whole datacenter has issues.


Hope this helps.


Regards,

SQLCoffee.com

Alberto Morillo
SQLCoffee.com


这篇关于必须有正确的方法来执行Azure SQL数据库备份吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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