Solved

RESTORE to be possible only for a limited time

Posted on 2013-06-26
6
154 Views
Last Modified: 2013-06-27
I want the backup to be valid only for one day.. so if someone tries to restore on 2nd day, it should say 'not possible- expired'..

but i am not sure EXPIREDATE/RETAINDAYS do that.. are there any other options?
0
Comment
Question by:25112
6 Comments
 
LVL 69

Assisted Solution

by:ScottPletcher
ScottPletcher earned 125 total points
ID: 39279421
Neither EXPIREDATE or RETAINDAYS would do that.  In fact, I don't think there's any way to do that.  

Partly because it's not really logical: they probably figued if you didn't want anyone to use the backup at all, you'd just delete it :-).
0
 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39279455
The only way of doing something like this would be to have whomever would do the RESTORE to call a stored procedure instead of doing the RESTORE directly.  You would then program this functionality into your stored procedure (perhaps even making it generic and having the procedure restore the latest "valid" backup automatically).


Otherwise, like ScottPletcher says, you do *NOT* want this.  What if your server crashes and it takes you three days to set up a new one?  In this case, you would be screwed as you wouldn't be able to restore from your "expired" backup.
0
 
LVL 5

Author Comment

by:25112
ID: 39280080
hi - the reason we want this is:
users ask for db backup.. its Ok.. but they are known for not deleting from their local machines or let it sit forever..  and hence cause security concern that someone not authorizaed will get it..if we make it expire it in ___ days, it puts some restraint...

any other tweaks that can be done?
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39280092
No - if I get a copy of your database (.bak file), I can restore it and do whatever I want with it for as long as I want.  There is no time functionality built into MSSQL.
0
 
LVL 25

Accepted Solution

by:
jogos earned 125 total points
ID: 39280410
If it is a security concern you definitly should not provide them the files. Have an environment where they can use the restored version for x days.  Central permissions, no one without authority can do anything on it you don't want.  Files can't be copied, restored on local system and backuped again.....
0
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 39281478
You could write a job/process that used the SQL backup history (in msdb) to follow up and delete any local backups made after (n) day(s).
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now