cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled weekly restore of production SQL database to development

alexp01482
Level 0

Hi

I want to automate a weekly restore of the most recent full backup of a  SQL production database, to a development instance.

The problem I'm having is finding the job ID of the most recent backup.

I've tried using bpimagelist 

bpimagelist -pt MS-SQL-Server -hoursago 48 -client Server1.com -idonly -st FULL

but I can't differentiate between the databases that are backed up on that instanace. Does anyone kjnow how to do this, or does someone have a better way  to automate the restore.

Cheers

Alex

1 ACCEPTED SOLUTION

Accepted Solutions

StefanosM
Level 6
Partner    VIP    Accredited Certified

use the following command to find the correct NBIMAGE

bplist -C <SQLHOST> -S <NBSERVER> -t 15 -R 99 -s <sdate> -e <edate> \

Then insert it to a ready bch script or create it on the fly and run it using  the command
dbbackex -f <bch_script> -np

View solution in original post

2 REPLIES 2

StefanosM
Level 6
Partner    VIP    Accredited Certified

use the following command to find the correct NBIMAGE

bplist -C <SQLHOST> -S <NBSERVER> -t 15 -R 99 -s <sdate> -e <edate> \

Then insert it to a ready bch script or create it on the fly and run it using  the command
dbbackex -f <bch_script> -np

Nicolai
Moderator
Moderator
Partner    VIP   

Checkout the bpflist command as well, it can be run from the client