Hello,
Our Navision database is hosted on a SQL Server 2005. The recovery model is set to full. A maintenance plan performs a full daily database backup at night. During the day there are multiple transaction log backups scheduled.
The full database backups are kept 14 days.
Today I noticed that the transaction log backups are also stored for 14 days. Is it of any use to store the transaction log backups for more then 1 day when performing a daily full backup? (because, and correct me if I'm wrong, the transaction logs contains al changes to the database since the last succesfull full database backup).
Does it make any difference in the ability to restore any data when you save thes log backups longer?
Thanks in advance,
Best Regards,
Timothy Yzermans
0
Comments
It really depends on how much detail you want, and over what kind of period you want it. I'd say that keeping 14 days worth of TL backups is probably a bit too much, but it does make it so that you can restore it to any point in time over the past 14 days. The more you trim down on what you save, the less you will be able to restore. The decision about what to save should be made by the people that own the data though, it's not a technical decision.
RIS Plus, LLC
The answer is no. If you keep a full backup nightly, you do not have to keep the transaction log for the prior day. This is assuming, of course as Denster said, that your backup doesn't fail.
Say your database became corrupt at 11:45pm on 1/15/09. You would need to restore:
1. Full database backup from 1/14/09
2. All the TLOG backup from 1/14/09 from 1:00am to 11:00pm (assuming you backup TLOG every hour).
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
it's so easy to get the answers :-D
(is there nobody who reads books or anything else before :-# )
And when I restore the data into another temporary database? Doesn't that give me more options for restoring data?
Hmm, that's indeed a situation to keep in mind. Unless... I now have 4 seperate maintenance plans. 2 for the backup jobs (full DB + TL) and another 2 for cleaning up the history. When I replace the MPs for the "full DB backup" and "TL-backup File cleanup" with 1 plan with 2 subplans where the first would be the one doing a full DB Backup and the second subplan for cleaning up the TL-backups files with the clausule that the job must end/abort when the first subplan should fail. In that case the TL-backup files won't be deleted when the full backup job fails, right?
Thanks for the advice guys.
Best regards,
Timothy Yzermans
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Your assumption is that as soon as you have a full backup for moment in time X, all TL backups that were made before that become obsolete, which I don't necessarily agree with. This depends on what you want to achieve, and what your attitude is toward data loss. I think he means a job that clears the old TL backup files
RIS Plus, LLC
When you create the maintenance plan that creates the backups, there is an option in there that says "keep backups for x days", and it will automatically delete older files when a new backup is created. You don't need a separate job for that, unless of course you just feel more comfortable doing it that way.
There are some excellent articles about backup strategies in SQL Server Books Online. From the Start menu, All programs, SQL Server 2005, Documentation and Tutorials, you will find SQL Server books online. Go to the search tab and search for the word backup, or backup strategies, maintenance plan, thigns like that. There is a ton of information in there.
RIS Plus, LLC
This is why I state this in my original post:
On another note, the question posed here is on the SQL certification test and also on the Microsoft Press training material. So study hard if you plan to pass 70-431 or 70-432!
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Let's say you have Full backup 1, TL backup, TL, x, TL, TL, Full backup 2, TL, TL, TL, TL. Let's say you want to restore to point x. Whether the second full backup failed or not is irrelevant. My point is that if you want to be able to restore to that point, you don't delete those TL backups.
Your point is that as soon as you have full backup 2, then all TL backups before that become obsolete, and you can delete the previous ones right away. I don't think you can say that, because those TL backups serve a purpose.
RIS Plus, LLC
Let's say the DB became corrupt at 11:45 PM. Depending on what the corruption was and if you still have access to the db catalog:
1. Backup the active log tail
2. Restore full backup from 1/14/09 with NORECOVERY option
3. Restore all Tlog backups to 11:00 PM with NORECOVERY
4. Restore the log tail using STOPAT to 11:45 PM and recover
You know have a database restored to the point of failure.
You're right in the statement that old TLOG serves different purposes. But the original posting didn't really specify what the backup is used for. I just made an assumption that it was used to restore database after it's corrupted.
Perhaps I haven't seen enough SQL implementations, but I never encountered a situation where a corrupt transaction in NAV was not detected immediately.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
#-o You're absolutely correct.. Time to hit the books again...
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
From the original post: To which I replied the answer is mainly theoretical, and I gave an example of when you would need to use older TL backups, and stated that it depends on the attitude of the user.
For whatever reason you would want to be able to restore to any specific point between two full backups, you would need to have those TL backups. You can't just say that TL backups become obsolete when you take a full backup, and that you can delete them as soon as you take a full backup, that is simplifying it too much.
RIS Plus, LLC