Home Forums Programming SMO/RMO/DMO Powershell SMO - LastBackupDate without Copy_only Backup RE: Powershell SMO - LastBackupDate without Copy_only Backup

  • Satheesh E.P. - Saturday, September 9, 2017 8:07 AM

    @jeff Moden

    I need to restore 7 databases from 5 different production servers and restore it into a development server. I am using Powershell to get last full backup and latest differential backup location from all production server and then move it to a single location in BLOB storage and restore it from there. My development server is Azure VM but production is both Azure and On-premises.

    @alzdba

    Many thanks for your script. Since I need only the last full backup location, I had written a simple script to get that detail.

    Sounds interesting.  Any chance of you posting the "de-sensitized" version of your PowerShell routine for this?  It would likely help quite a few folks that need to do something similar especially since some of your DBs are on Azure.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)