Windows Server backup completed flag/alert set for triggering script

Welcome Forums General PowerShell Q&A Windows Server backup completed flag/alert set for triggering script

Viewing 4 reply threads
  • Author
    Posts
    • #273256
      Participant
      Topics: 2
      Replies: 2
      Points: 22
      Rank: Member

      We are running Windows Backup using WBadmin commands.  What we would like to do is have backups run consecutively once the previous back has completed – successfully or unsuccessfully. So let’s say there are three backup scripts –

      backup1 – backs up VM1

      backup2 – backs up VM2

       

      backup3 – backs up VM3

       

      What we would like to do is once backup1 completes – either successfully or not – just as long as when  it’s finished that we get some alert/flag set so that backup2 can be triggered.

       

      Feedback is appreciated in advance.

    • #273274
      Senior Moderator
      Topics: 9
      Replies: 1420
      Points: 5,280
      Helping Hand
      Rank: Community MVP

      Are you executing backup using task scheduler ? You can try sending mail using Send-MailMessage cmdelt at the end of the backup script based on the backup status.

    • #273870
      Participant
      Topics: 2
      Replies: 2
      Points: 22
      Rank: Member

      Thanks. However I need to know when the 1st backup has stopped running. How do I query for that from a script? So I run script one and it either does the backup or not but regardless I start the backup on the 1st backup having stopped – again regardless of stop condition. What is the flag for the status that a backup job is finished/not running any more?

    • #273876
      Participant
      Topics: 9
      Replies: 676
      Points: 2,674
      Helping Hand
      Rank: Community Hero
    • #273915
      Participant
      Topics: 2
      Replies: 2
      Points: 22
      Rank: Member

      Thanks. I’m not sure though how I would use this as part of a script.  Are there different codes for different status of a job? So running is one code, completed is another, etc.?  Also how would I monitor for that code? Because I have no idea when the job will be finished/come to a stop I have to have some monitoring process going on that will spot when the job stops.  How do I setup that monitoring?

Viewing 4 reply threads
  • You must be logged in to reply to this topic.