Wednesday, March 7, 2012

Question about Back ups

I have a production server that has a lot of data changes through out the
day. I do one full back up at night and do hourly log back ups through out
the major part of the day.
My question is when I do the full back up does it back up the log as well
and does it purge the data in the log? Also, when I do hourly log back ups
should I append the most recent hourly log back up or overwrite it? Not sure
if the log purges when you do a back up?
Thanks for your help?
-ChrisChris
My question is when I do the full back up does it back up the log as well
> and does it purge the data in the log?
Yes , it does backup log file as well, but it does not "clear" the file ( I
mean ,commited tranactions(inactive portions) are still in)
>Also, when I do hourly log back ups
> should I append the most recent hourly log back up or overwrite it?
Well , you could by using backup log file WITH INIT option, however , an
advantage of this option is that in terms of database's crach you don't need
to apply hundred of logs to get the database "healthy", on the other hand
if your last full database is corrupted/lost , you are still will ne able to
restore a backup from the two/three weeks ago and apply all log files
without loosing the data, actually it is possible because whole databse
backup does not truncate log files
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:2992A4FC-E1DB-4108-9DD8-3B4E515CCD43@.microsoft.com...
>I have a production server that has a lot of data changes through out the
> day. I do one full back up at night and do hourly log back ups through out
> the major part of the day.
> My question is when I do the full back up does it back up the log as well
> and does it purge the data in the log? Also, when I do hourly log back ups
> should I append the most recent hourly log back up or overwrite it? Not
> sure
> if the log purges when you do a back up?
> Thanks for your help?
> -Chris
>|||On Wed, 24 May 2006 05:06:02 -0700, Chris wrote:

>I have a production server that has a lot of data changes through out the
>day. I do one full back up at night and do hourly log back ups through out
>the major part of the day.
>My question is when I do the full back up does it back up the log as well
>and does it purge the data in the log?
Hi Chris,
See Uri's reply.

> Also, when I do hourly log back ups
>should I append the most recent hourly log back up or overwrite it? Not sur
e
>if the log purges when you do a back up?
Don't overwrite it. The log file is purged after a log backup. If you do
a full backup at midnight and log backups on the full hour, recovering
from a crash at 4:15 PM requires you to restore
- The last full backup,
- All log backups since midnight up to 4 PM
- The log backup up to 4:15 PM (taken after the crash)
You should only overwrite log backups from before the last full backup,
and you might consider keeping them around for some time as well since
this would be an extra safeguard in case the full backup would be
corrupted.
Hugo Kornelis, SQL Server MVP|||Hugo
> You should only overwrite log backups from before the last full backup,
> and you might consider keeping them around for some time as well since
> this would be an extra safeguard in case the full backup would be
> corrupted.
I meant to use WITH INIT option once in two/three weeks and NOT after every
LOG file that the OP does.
I fully agree with you that we don't need to owerwrite log file backups
after each backup (hourly in his case)
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:3mk8721gfi3lhd36khnhoh4ul8cne0h2u3@.
4ax.com...
> On Wed, 24 May 2006 05:06:02 -0700, Chris wrote:
>
> Hi Chris,
> See Uri's reply.
>
> Don't overwrite it. The log file is purged after a log backup. If you do
> a full backup at midnight and log backups on the full hour, recovering
> from a crash at 4:15 PM requires you to restore
> - The last full backup,
> - All log backups since midnight up to 4 PM
> - The log backup up to 4:15 PM (taken after the crash)
> You should only overwrite log backups from before the last full backup,
> and you might consider keeping them around for some time as well since
> this would be an extra safeguard in case the full backup would be
> corrupted.
> --
> Hugo Kornelis, SQL Server MVP|||So if the log file is purged after the log back up then I want to append the
last back up until I do a full back up. Is there a way to overwrite once,
after the full back up so my log back up file is not growing to an enormous
size?
"Hugo Kornelis" wrote:

> On Wed, 24 May 2006 05:06:02 -0700, Chris wrote:
>
> Hi Chris,
> See Uri's reply.
>
> Don't overwrite it. The log file is purged after a log backup. If you do
> a full backup at midnight and log backups on the full hour, recovering
> from a crash at 4:15 PM requires you to restore
> - The last full backup,
> - All log backups since midnight up to 4 PM
> - The log backup up to 4:15 PM (taken after the crash)
> You should only overwrite log backups from before the last full backup,
> and you might consider keeping them around for some time as well since
> this would be an extra safeguard in case the full backup would be
> corrupted.
> --
> Hugo Kornelis, SQL Server MVP
>|||> So if the log file is purged after the log back up then I want to append then">
> last back up until I do a full back up.
What about backup generations?

> Is there a way to overwrite once,
> after the full back up so my log back up file is not growing to an enormou
s
> size?
You have to code that functionality. Or use maintenance plans. Nothing built
-in at the TSQL level.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:407FDDF9-0D12-4F6E-8E4C-364743B6DC65@.microsoft.com...[vbcol=seagreen]
> So if the log file is purged after the log back up then I want to append t
he
> last back up until I do a full back up. Is there a way to overwrite once,
> after the full back up so my log back up file is not growing to an enormou
s
> size?
>
> "Hugo Kornelis" wrote:
>|||Great Thanks for all of your help !!
"Uri Dimant" wrote:

> Hugo
> I meant to use WITH INIT option once in two/three weeks and NOT after ever
y
> LOG file that the OP does.
> I fully agree with you that we don't need to owerwrite log file backups
> after each backup (hourly in his case)
>
>
>
> "Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
> news:3mk8721gfi3lhd36khnhoh4ul8cne0h2u3@.
4ax.com...
>
>

No comments:

Post a Comment