Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Backups
»
need backup strategy
11 posts, Page 1 of 2
1
2
»»
need backup strategy
Rate Topic
Display Mode
Topic Options
Author
Message
chandio11
chandio11
Posted Sunday, March 29, 2009 3:12 PM
Forum Newbie
Group: General Forum Members
Last Login: Monday, September 14, 2009 12:03 PM
Points: 5,
Visits: 41
hi,
I have schedule a mantanace plan to backup the database on daily basis, it backups the full databse and i have the set the expiry after 6 days. Now my requiremtn is that i want to keep the backup of 6 days and delete other backups, iam using the hard drive for my backup no external storage.
I have schedule this on production but it does not delete the old backups, i have to manually delete all old backups and keep the recent 6 backups.
Can any body tell me what is database expiration ?? and tell me the starategy to implement this scenario.
Thanks in advance.
Post #685798
Mohit K. Gupta
Mohit K. Gupta
Posted Sunday, March 29, 2009 7:12 PM
SSC Eights!
Group: General Forum Members
Last Login: Monday, June 10, 2013 10:58 AM
Points: 941,
Visits: 1,042
Database Expiry date is not for deleting old backups; it indicates when the file can be overwritten. But since you are using the maintenance plans the file name will always be new so it will never trigger that.
Instead of using that, use the "Maintenance Plan Cleanup" task, set it to delete backups older then 6 days.
Thanks.
---
Mohit K. Gupta, MCITP: Database Administrator (2005),
My Blog
, Twitter:
@SQLCAN
.
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing.
How to ask for help .. Read Best Practices
here
.
Post #685837
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Sunday, March 29, 2009 8:15 PM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 5:09 AM
Points: 31,526,
Visits: 13,864
mohit is correct.
Expiration is for overwriting backups, like if you had multiple ones in a file. (which is a bad idea)
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #685843
Grant Fritchey
Grant Fritchey
Posted Monday, March 30, 2009 6:55 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 9:49 AM
Points: 13,436,
Visits: 25,281
Steve Jones - Editor (3/29/2009)
mohit is correct.
Expiration is for overwriting backups, like if you had multiple ones in a file. (which is a bad idea)
I'm not saying you're wrong, in fact I agree, but I'm curious why you said that.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #686042
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Monday, March 30, 2009 7:11 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 5:09 AM
Points: 31,526,
Visits: 13,864
Which part? The multiple backups in one file? I'd say that it's a poor practice because are increasing your risk. Every file has the chance of corruption, bad blocks, something going wrong. If you put multiple backups in one file, and it corrupts, you can lost multiple days worth of backups, which would mean that either you go back to tape, which might break your SLA and defeat the purpose of keeping more than one backup on disk.
Or you are restoring from more than 2 days ago. Potentially not restoring at all.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #686059
Grant Fritchey
Grant Fritchey
Posted Monday, March 30, 2009 7:47 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 9:49 AM
Points: 13,436,
Visits: 25,281
Yep, that was it. I was just curious what your thought processes were. I do agree.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #686104
Mohit K. Gupta
Mohit K. Gupta
Posted Monday, March 30, 2009 11:18 AM
SSC Eights!
Group: General Forum Members
Last Login: Monday, June 10, 2013 10:58 AM
Points: 941,
Visits: 1,042
Grant/Steve,
Going to pop another question about backups that I am curious about; I always have done backups directly to file using BACKUP DATABASE DBNAME TO DISK = ''... But I have acquired some servers where they used Backup Devices instead (SQL 2000), they are backup files also. I have yet to discover an advantage to using backup devices over just direct backups? I changed the backup because one device held backups for more the one day and I didn't like the idea of that because if the device went then I was out of backups for whole week. Can you guys think of an reason other then they left it because it was in 6.5 for backwards compatibility?
Mohit.
---
Mohit K. Gupta, MCITP: Database Administrator (2005),
My Blog
, Twitter:
@SQLCAN
.
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing.
How to ask for help .. Read Best Practices
here
.
Post #686328
Grant Fritchey
Grant Fritchey
Posted Monday, March 30, 2009 12:10 PM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 9:49 AM
Points: 13,436,
Visits: 25,281
My memories of 6.5 are fuzzy (and painful) but I think you could backup directly to disk even then, but I could be wrong.
The one reason I can think of to use a device is because you change it without changing the backup scripts. As long as the device name is the same, you can change where the device stores information, but you don't have to modify the scripts.
However, since I do backups to individual files, I have to change the names every time anyway. So I don't see the savings possible in something like this.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #686360
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Monday, March 30, 2009 12:16 PM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 5:09 AM
Points: 31,526,
Visits: 13,864
you could go to disk in v6.5, did it for years. Never to tape directly since that was slow, and error prone.
Devices are there precisely to have the same script/code on every server. So you could a one script that backed up everything to once device. This was left over from the Sybase/tape world, and I think it's a poor practice as well for the same reason.
It's too easy to code around the need for the same name these days to do that. If it were 400 lines of script I could see devices working well, but with simple T-SQL/VBScript/Powershell, why do it?
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #686364
timothyawiseman
timothyawiseman
Posted Monday, March 30, 2009 12:23 PM
Right there with Babe
Group: General Forum Members
Last Login: 2 days ago @ 12:40 PM
Points: 748,
Visits: 905
Chandio, for the way you are describing your set up, you will need to write a script to check the dates and delete them after they expire. You can do that in T-sql and incorporate it into your backup jobs, or you can write it as a shell script or some other language like python and then make it an operating system job.
Another option is to use a 3rd party program, such as RedGate sql backup, which will manage that for you.
---
Timothy A Wiseman
SQL Blog:
http://timothyawiseman.wordpress.com/
Post #686368
« Prev Topic
|
Next Topic »
11 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.