Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are using a TSQL script to back up our database every night, and in this scrip it uses -DelBkUps 1DAYS to remove the old disk copy of the backup. However we are running out of disk space at the moment and I would like to change this to something like -DelBkUps 0.5DAYS

The documentation here http://msdn.microsoft.com/en-us/library/ms162827.aspx says that i should use time_span but gives me no examples of what is acceptable in this field.

Can some one here help me find acceptable documentation, or give me an example of how I would set the time_span to a number of hours instead of days?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The format for this is listed at the bottom of the syntax section of the web page referenced.

<time_period> ::=
number[minutes | hours | days | weeks | months]

Here are the samples.

number[minutes| hours| day| weeks| months]
Specifies the time interval used to determine if a report or backup file is old
enough to be deleted. number is an integer followed (without a space) by 
a unit of time. Valid examples:
12weeks
3months
15days
If only number is specified, the default date part is weeks.
share|improve this answer
    
Well don't I feel silly now? I just missed that part when I read over it. I had to go back and re-read it again to catch it. –  sec_goat Mar 12 '13 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.