Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

need backup strategy Expand / Collapse
Author
Message
Posted Sunday, March 29, 2009 3:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Posted Sunday, March 29, 2009 7:12 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, March 10, 2014 9:39 AM
Points: 942, Visits: 1,050
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
Posted Sunday, March 29, 2009 8:15 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 11:24 AM
Points: 32,781, Visits: 14,942
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
Posted Monday, March 30, 2009 6:55 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:48 AM
Points: 14,802, Visits: 27,278
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
Posted Monday, March 30, 2009 7:11 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 11:24 AM
Points: 32,781, Visits: 14,942
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
Posted Monday, March 30, 2009 7:47 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:48 AM
Points: 14,802, Visits: 27,278
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
Posted Monday, March 30, 2009 11:18 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, March 10, 2014 9:39 AM
Points: 942, Visits: 1,050
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
Posted Monday, March 30, 2009 12:10 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:48 AM
Points: 14,802, Visits: 27,278
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
Posted Monday, March 30, 2009 12:16 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 11:24 AM
Points: 32,781, Visits: 14,942
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
Posted Monday, March 30, 2009 12:23 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, April 04, 2014 4:40 PM
Points: 751, Visits: 917
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 »

Add to briefcase 12»»

Permissions Expand / Collapse