DaveBenson
Programmer
Hi,
I am in the process of working out a backup strategy for an SQL database that uses the full recovery model and also looking for a better general understanding that I would be able to apply to future databases.
I am clear (I think) about using full / differential / log backups. However I'm confused about backup sets and whether to use append to existing set or overwrite or whether to write to a new file each time.
Say for the sake of argument I have decided to take a full backup every month, a differential backup every week and a log backup every day and with the backup files going to a network drive.
If I used append for every backup, I presume I could get recovery up to the nearest day if needed. However the file for the backup set would soon become pretty huge as it would have a new copy of full database added to it each month, as well as everything else.
If on the other hand, I used overwrite every time does this mean I lose everything apart from the last backup? If this is the case and my last backup was the log (the most likely scenario), does this mean the backup would be useless for recovery as I would also need the full backup and any log backups before this one (all of which will have been overwritten) for recovery to work?
If I have got this right, neither strategy seems acceptable. Would it instead make more sense to overwrite when taking the full backup and then append when taking the differential and logs. Then I would in effect start a group of backups each month (I would have to accept that I would not be able to restore any further back than the last month).
I have noticed on some posts people say about making a different file for each backup. This makes some sense as well - however I'm not clear at all in what I should shouldn’t do - eg can all backups go in different files or should all log backups go in the same file etc. When dabbling with this on a practice database, I get a message saying media is only formatted to support one media family.
Whilst I could probably work out what seems a sensible way forward ,bearing in mind I'm pretty new to SQL server, I think it would be sensible to get an idea of is how experienced DBA's would normally approach this. The part of backups relating to full backups, log backups etc seems very well documented on the web with plenty of advice for any novices but I haven't found anything that combines this with whether backups should append, overwrite or be on different backup files
Any feedback welcome - even if it is just to direct me to a page / blog that clearly explains this!
Thanks
I am in the process of working out a backup strategy for an SQL database that uses the full recovery model and also looking for a better general understanding that I would be able to apply to future databases.
I am clear (I think) about using full / differential / log backups. However I'm confused about backup sets and whether to use append to existing set or overwrite or whether to write to a new file each time.
Say for the sake of argument I have decided to take a full backup every month, a differential backup every week and a log backup every day and with the backup files going to a network drive.
If I used append for every backup, I presume I could get recovery up to the nearest day if needed. However the file for the backup set would soon become pretty huge as it would have a new copy of full database added to it each month, as well as everything else.
If on the other hand, I used overwrite every time does this mean I lose everything apart from the last backup? If this is the case and my last backup was the log (the most likely scenario), does this mean the backup would be useless for recovery as I would also need the full backup and any log backups before this one (all of which will have been overwritten) for recovery to work?
If I have got this right, neither strategy seems acceptable. Would it instead make more sense to overwrite when taking the full backup and then append when taking the differential and logs. Then I would in effect start a group of backups each month (I would have to accept that I would not be able to restore any further back than the last month).
I have noticed on some posts people say about making a different file for each backup. This makes some sense as well - however I'm not clear at all in what I should shouldn’t do - eg can all backups go in different files or should all log backups go in the same file etc. When dabbling with this on a practice database, I get a message saying media is only formatted to support one media family.
Whilst I could probably work out what seems a sensible way forward ,bearing in mind I'm pretty new to SQL server, I think it would be sensible to get an idea of is how experienced DBA's would normally approach this. The part of backups relating to full backups, log backups etc seems very well documented on the web with plenty of advice for any novices but I haven't found anything that combines this with whether backups should append, overwrite or be on different backup files
Any feedback welcome - even if it is just to direct me to a page / blog that clearly explains this!
Thanks