系统损坏sql数据库备份
A Database administrator’s key task is to keep the database healthy and available for the users. We are used to taking regular SQL backups depending upon the database criticality and the recovery model. We define the Recovery Point Objective (RPO) Recovery Time Objective (RTO) or the database system, and we should be able to recover the database in any scenario to meet the requirement.
数据库管理员的关键任务是保持数据库的健康并为用户使用。 我们习惯于根据数据库的重要性和恢复模型进行常规SQL备份。 我们定义了恢复点目标(RPO)恢复时间目标(RTO)或数据库系统,并且我们应该能够在任何情况下恢复数据库以满足要求。
We have the following backup types available in SQL Server.
SQL Server中有以下可用的备份类型。
- Simple Recovery Model: Full and differential backup 简单恢复模型:完整备份和差异备份
- Full Recovery model: Full, differential and log backup 完全恢复模式:完整,差异和日志备份
Consider a scenario in which we are taking regular database backups. Due to some unexpected issues such as database corruption, server or hard disk failure, the database is down. In this case, we want to restore the last full SQL backup to recover the database. You cannot restore the database backup because the backup file is corrupt. If we cannot restore the backup during such critical scenarios, there is no use of taking backups in the first place. If we do not have a valid database backup in a disaster scenario, we might lose data since the previous successful valid backup.
考虑一个我们要进行常规数据库备份的方案。 由于某些意外问题,例如数据库损坏,服务器或硬盘故障,数据库已关闭。 在这种情况下,我们要还原上一次完整SQL备份以恢复数据库。 您无法还原数据库备份,因为备份文件已损坏 。 如果在这样的关键情况下我们无法还原备份,那么首先就不用备份了。 如果在灾难情况下我们没有有效的数据库备份,则由于先前成功的有效备份,我们可能会丢失数据。
In this article, we will use a different way to identify and be sure that our backups are healthy. This way we can ensure that our environment will be able to recover in case of any unexpected downtime.
在本文中,我们将使用另一种方式来识别并确保备份运行状况良好。 这样,我们可以确保在发生意外停机时能够恢复我们的环境。
使用SQL Server Management Studio验证数据库备份 (Verify Database Backups using SQL Server Management Studio)
Let us look at the steps to take full backup using SSMS. Right click on the database -> Backups:
让我们看看使用SSMS进行完整备份的步骤。 右键单击数据库->备份:
In the first page, we define the SQL backup type and the backup file location:
在第一页中,我们定义SQL备份类型和备份文件位置: