Wednesday, March 7, 2012

Question about backups.

Hi guys,
I'm not very familiar with backups, and I have a simple question.
Let's suppose that I do one full backup and 10 differential backups.
If sometime later, I delete the first 9 of those differential backups
and I keep only the last one, should I be able to restore the whole
database?
ThanksYou always have to restore the last FULL backup and then you should only
need the last DIFF since it always includes any changes since the last FULL
backup. Be aware that if you are using the SIMPLE recovery mode or you are
not issuing regular LOG backups you will not be able to recover any
transactions that occurred since the last DIFF and the time you have an
issue.
--
Andrew J. Kelly SQL MVP
"Star" <noemail@.noemail.com> wrote in message
news:O6ykFzzKGHA.3200@.tk2msftngp13.phx.gbl...
> Hi guys,
> I'm not very familiar with backups, and I have a simple question.
> Let's suppose that I do one full backup and 10 differential backups.
> If sometime later, I delete the first 9 of those differential backups and
> I keep only the last one, should I be able to restore the whole database?
> Thanks|||Thanks Andrew for your help.
Just a couple of more questions
1. If I make a transaction log backup, is the transaction log deleted in
that moment?
2. When is it safe to truncate the transaction log?
Andrew J. Kelly wrote:
> You always have to restore the last FULL backup and then you should only
> need the last DIFF since it always includes any changes since the last FULL
> backup. Be aware that if you are using the SIMPLE recovery mode or you are
> not issuing regular LOG backups you will not be able to recover any
> transactions that occurred since the last DIFF and the time you have an
> issue.
>|||1. The log itself is never deleted. It is a physical file that must exist
in order for SQL Server to operate. When you backup the log it will allow
the space in the file taken up by committed transactions to be reused for
new transactions.
2. Almost never. That is something that should be done via backing up the
log. If you manually truncate a log file you may void it's usefulness for
recovery purposes.
I suggest you read up in BooksOnLine under BACKUP and RESTORE for more
details. Also "Inside SQL Server 2000" by Kalen Delaney goes into quite a
bit of detail on how the log works along with backups & restores.
--
Andrew J. Kelly SQL MVP
"Star" <noemail@.noemail.com> wrote in message
news:Od1VpK0KGHA.2668@.tk2msftngp13.phx.gbl...
> Thanks Andrew for your help.
> Just a couple of more questions
> 1. If I make a transaction log backup, is the transaction log deleted in
> that moment?
> 2. When is it safe to truncate the transaction log?
>
>
> Andrew J. Kelly wrote:
>> You always have to restore the last FULL backup and then you should only
>> need the last DIFF since it always includes any changes since the last
>> FULL backup. Be aware that if you are using the SIMPLE recovery mode or
>> you are not issuing regular LOG backups you will not be able to recover
>> any transactions that occurred since the last DIFF and the time you have
>> an issue.|||Thanks a lot. I appreciate all your help.

No comments:

Post a Comment