Forum Discussion

alexp01482's avatar
alexp01482
Level 0
2 years ago

Scheduled weekly restore of production SQL database to development

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

  • 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

2 Replies

  • 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

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