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.

I am doing the below :

RESTORE DATABASE UAT
FROM DISK = 'E:\Databases\backup\MY_LIVE_20120720_070001.bak'
WITH REPLACE

But I want to be able to use a file location that ignores the numbers in the file name (which represent the date) in my back up file. There will only ever be one 'MY_LIVE_****.bak' but its number string will change each day.

The goal is to restore my UAT instance from live each week, using the latest backup - of which there will be only file matching that string prefix, but the numbers/date will change each week.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Not quite the answer that you're looking for, but the name of the backup file can be found in a combination the backup* tables in msdb. Your restore process could query the production msdb, figure out the backup file name, and go from there. Aside from that, there's always powershell which gives you the perfect blend of file system and database access.

share|improve this answer

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.