Friday, February 24, 2012

Backup and Log Strategies

Hi all,
I'm mostly an application developer - so please don't flog me for not
knowing things which are probably very basic. Our machine keeps
running out of space. We have all our data/bak/log files on e: , and
they have some kind of maintenance plan set up. Backups of the data
and log are created one after another and never deleted. In the 4
years we've been running various systems, we've never had to restore to
a previous time - just restore to current state once.
I've also read that the transaction log should automatically shrink
after it is backed up. When I do this manually it doesn't happen - I
have to run 'shrink db' after to make it happen. It doesn't seem to
happen with their scheduled routines either.
Do people write scripts to delete old backups?
Should we be using the overwrite option so we don't get a buildup?
What other tips might you have?
thanks alot
SamMaint Plans creates a new file for every backup. so if you use maint plans, there no "overwrite"
considerations. MPs also have option to remove backups "older than...". Check the plan to see what
it is configured for. MPs has (among other things) one bad behavior, though. If a plan fails, it
stops. And removal of old backup files is among the last things performed. One such frequent reason
if that you have included databases in simple recovery mode for plans that try to do log backups. So
sqlmaint tries a log backups for, for example master, it fails and the execution stops without
removing *any* old backup files.
The ldf file is emptied when you do a log backup, that is not the same as shrinking the file size.
See http://www.karaszi.com/SQLServer/info_dont_shrink.asp for elaborations on the subject.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<samuelgreene@.gmail.com> wrote in message
news:1154533293.924009.30720@.m73g2000cwd.googlegroups.com...
> Hi all,
> I'm mostly an application developer - so please don't flog me for not
> knowing things which are probably very basic. Our machine keeps
> running out of space. We have all our data/bak/log files on e: , and
> they have some kind of maintenance plan set up. Backups of the data
> and log are created one after another and never deleted. In the 4
> years we've been running various systems, we've never had to restore to
> a previous time - just restore to current state once.
> I've also read that the transaction log should automatically shrink
> after it is backed up. When I do this manually it doesn't happen - I
> have to run 'shrink db' after to make it happen. It doesn't seem to
> happen with their scheduled routines either.
> Do people write scripts to delete old backups?
> Should we be using the overwrite option so we don't get a buildup?
> What other tips might you have?
> thanks alot
> Sam
>|||Thank you very much!

No comments:

Post a Comment