News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Run backup apps in sequence

    Posted on bmeacham Comment on the AskWoody Lounge
    Viewing 8 reply threads
    • Author
      Posts
      • #2147993 Reply
        bmeacham
        AskWoody Plus

        I have set up Windows Backup and Restore to execute once a week, on Mondays at 1:00 am. I plug in my external drive Sunday evening and then just let the system sit there turned on overnight. Works fine. I do not include a system backup here, only file backups. The next morning I manually run Macrium Reflect to make a system image.

        I want to automate this process. After Windows Backup and Restore finishes running, I want Macrium Reflect to start up and make a system image.

        I can run Macrium Reflect from the command line, so I could create a batch file to run it. But how can I trigger the batch file to run when Windows Backup and Restore is finished?

        I can configure Macrium Reflect to run on a schedule, but that’s not quite what I want. I don’t want to run it at a certain time, I want to run it after Windows Backup and Restore finishes.

        Any ideas?

      • #2152762 Reply
        PaulK
        AskWoody Lounger

        An idea or two (I haven’t done either of these).

        First, some references: do Google Searches on, and suggested hits from:
        a) [ windows task scheduler ]
        https://en.wikipedia.org/wiki/Windows_Task_Scheduler
        — Note particularly the info under “Task Scheduler 2.0”.
        b) [ task scheduler batch file ]
        – one hit, among several useful, is
        https://windows.tips.net/T013223_Running_a_Batch_File_at_a_Scheduled_Time.html
        c) Also see functionality of the command: SCHTASKS
        – schtasks /?
        – schtasks run /?
        d) https://www.windowscentral.com/how-create-task-using-task-scheduler-command-prompt

        SO, for your scheduled task of Backup-and-Restore, change the task to start a BATch file.
        Skeleton Weekly.Bat:
        Backup-and-Restore.exe (whatever is the proper path\program_name.exe)
        C:\Program Files\Macrium\Reflect\ReflectBin.exe (or whatever it is for you)

        I believe that one can use a Batch file to serialize operations.
        And, from a) above, also do serialization within a scheduled task.

      • #2152767 Reply
        Paul T
        AskWoody MVP

        How do you run the Windows backup?

        cheers, Paul

      • #2152800 Reply
        Alex5723
        AskWoody Plus

        I want to automate this process. After Windows Backup and Restore finishes running, I want Macrium Reflect to start up and make a system image.

        Windows has a function called : continuation task

        A continuation task (also known just as a continuation) is an asynchronous task that is invoked by another task, which is known as the antecedent, when the antecedent finishes.

        Don’t know if there are such apps or if you have to write your own.

      • #2152814 Reply
        Alex5723
        AskWoody Plus

        Don’t know if there are such apps or if you have to write your own.

        Forgot the link :

        https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/chaining-tasks-by-using-continuation-tasks

      • #2152959 Reply
        bmeacham
        AskWoody Plus

        How do you run the Windows backup?

        I schedule it in Windows Backup and Restore to run every Monday at 1:00 am.

        • #2153465 Reply
          Paul T
          AskWoody MVP

          I meant what is the command / executable? I was thinking it could be added to a batch / PowerShell.

          cheers, Paul

        • #2153466 Reply
          Paul T
          AskWoody MVP

          Some 3rd party backup apps have a “post processing” option for this sort of thing. Any sign of it in Windows backup?

          cheers, Paul

      • #2153106 Reply
        RetiredGeek
        AskWoody MVP

        Have a look at this post.  If you’re interested I’ll update it with my latest version of the Powershell.

        HTH 😎

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #2153504 Reply
        bmeacham
        AskWoody Plus

        what is the command / executable? I was thinking it could be added to a batch / PowerShell.

        Windows Backup and Restore has its own interface, which adds a scheduled task.

        I am looking into wbadmin, which might be able to run a backup task from the command line, but it looks like I can configure it to run only at a specified time every day but not on a specified day. Still investigating.

        • #2153513 Reply
          jabeattyauditor
          AskWoody Lounger

          what is the command / executable? I was thinking it could be added to a batch / PowerShell.

          Windows Backup and Restore has its own interface, which adds a scheduled task.

          I am looking into wbadmin, which might be able to run a backup task from the command line, but it looks like I can configure it to run only at a specified time every day but not on a specified day. Still investigating.

          Use wbadmin start backup (specify all the parameters) in a batch file; add the commands for macrium after the wbadmin command. Schedule the whole thing using Task Scheduler.

      • #2153509 Reply
        bmeacham
        AskWoody Plus

        Some 3rd party backup apps have a “post processing” option for this sort of thing. Any sign of it in Windows backup?

        I have not found any such option in the user interface.

    Viewing 8 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Run backup apps in sequence

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.