简体   繁体   English

通过Blob存储帐户的Azure Sql Server每日备份

[英]Daily Backup of Azure Sql Server over blob storage account

如何在Azure blob存储容器上安排Azure Sql数据库的每日自动备份。

You can't create or schedule Backups (.bak file format) of a managed Azure SQL Database. 您无法创建或计划托管Azure SQL数据库的备份(.bak文件格式)。

However, it is possible to create an export (.bacpac file format). 但是,可以创建导出(.bacpac文件格式)。 Such an export process can be started with Powershell and this Powershell Script can then be time-controlled with a Powershell-Runbook. 这样的导出过程可以使用Powershell启动,然后可以使用Powershell-Runbook对这个Powershell脚本进行时间控制。

I'm using this script for exactly the same purpose. 我出于完全相同的目的使用脚本。 It will create your database "backups" in the blob storage and it will also take care of how long backups are kept. 它将在blob存储中创建数据库“备份”,还将照顾备份的保留时间。

The full process is available here 完整的过程在这里

For Azure SQL Server (IaaS) : You can configure back up to a storage account using SSMS (SQL Server Management Studio) as shown here in " Database backup to URL " 对于Azure SQL Server(IaaS) :可以使用SSMS(SQL Server Management Studio)配置备份到存储帐户,如“ 数据库备份到URL ”中所示

This method was also included in an earlier answer that suggested using the tool SQLBackupandTFP here . 此方法也包含在较早的答案中,该答案在此处建议使用工具SQLBackupandTFP。

For Azure SQL Database (PaaS): Built-in backups are auto configured and work as such... "Seven days of automated backups of your databases are copied to RA-GRS Standard blob storage by default. The storage is used by weekly full backups, daily differential backups, and transaction log backups copied every 5 minutes. The size of the transaction log depends on the rate of change of the database. A minimum storage amount equal to 100% of database size is provided at no extra charge. Additional consumption of backup storage will be charged in GB/month." 对于Azure SQL数据库(PaaS):内置备份是自动配置的,其工作方式如下:“默认情况下,将数据库的七天自动备份复制到RA-GRS Standard blob存储。每周使用一次完整存储每5分钟复制一次备份,每日差异备份和事务日志备份。事务日志的大小取决于数据库的变化率。免费提供等于数据库大小的100%的最小存储量。备份存储的使用将以GB /月收费。” - Automated Backups-Storage Costs - 自动备份-存储成本

Automating copy of the database and export to the blob storage container is an option as well. 也可以选择自动执行数据库副本并导出到Blob存储容器。 However you are incurring the extra cost for the storage with this method--assuming it is only used for this purpose. 但是,使用这种方法会产生额外的存储成本-假设它仅用于此目的。

There is a good comparison of the two here . 还有就是两者的比较好这里

Here's a tool SQLBackupAndFTP can help you daily backup of Azure Sql database to you specified blob storage account. 这是一个工具SQLBackupAndFTP,可以帮助您每天将Azure Sql数据库备份到您指定的blob存储帐户。 It's free for download and using . 它是免费下载和使用。

You can download and install SQLBackupAndFTP tool, create a backup job. 您可以下载并安装SQLBackupAndFTP工具,创建备份作业。 I tried and it works well. 我尝试了,效果很好。 You can follow my step: 您可以按照我的步骤进行:

Step1 : Connect to Azrue SQL database : 步骤1连接到Azrue SQL数据库 在此处输入图片说明

Step2: Select database,select the database you want to backup : 步骤2: 选择数据库,选择要备份的数据库 在此处输入图片说明

Step3:****Store backups in selected destination : Choose the Azure Storage as the destination: 步骤3:****将备份存储在选定的目标位置 :选择Azure存储作为目标位置: 在此处输入图片说明

Step4:****Schedule backup : Set Schedule automatic backup time: 步骤4:****计划备份 :设置计划自动备份时间: 在此处输入图片说明

Step5: Run the backup job : 步骤5: 运行备份作业 在此处输入图片说明

For more details, you can reference this tutotial: How to automate SQL Server database backups . 有关更多详细信息,您可以参考以下教程: 如何自动执行SQL Server数据库备份

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM