公司SQL Server是排程週日做資料庫A、B、C的完整備份、
週一到六做差異備份,自動刪除超過一週檔案
問題1、若我在週四要還原到週三,我是先還原週日的完整備份,再還原週三的差異備份就好
或者是要,先還原完整備份,再依序還原一->二->三的差異備份?
因我看網路上有兩種教學,有點搞不清楚...
問題2、若我在週三 為了修改數據,先對資料庫A做一個手動完整備份
後續幾天的資料庫A 排程差異備份,是會備份週三的手動備份後的差異嗎?
我之前都修改完後,過兩、三天沒問題就直接砍了手動備份,謝謝
一般備份有三種類型: Full(完整), Differential(差異), Incremental(增量)
後兩者都是只備份某一次 Full 之後的變更, 但其不同點在於:
由於 Microsoft SQL 提供的是 Differential 備份類型, 所以你只需要還原 Full 和指定日期的 Differential 就可以了. 這裡有詳細的解釋:
Differential Backups (SQL Server)
關鍵段落在此:
A differential backup captures only the data that has changed since that full backup.
Therefore restoring from a differential backup will necessarily take more steps and time than restoring from a full backup because two backup files are required.
At restore time, before you restore a differential backup, you must restore its base. Then, restore only the most recent differential backup to bring the database forward to the time when that differential backup was created. Typically, you would restore the most recent full backup followed by the most recent differential backup that is based on that full backup.