and


Author
Message
Hans Troost
Hans Troost
New Member
New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)
Group: Forum Members
Posts: 2, Visits: 10
Dear all
Due to my specific situation and requirements I have 2 questions regarding MR-8's possibilities to run "pre-"and "post-backup" programs under "Default Run Programs and Scripts". especially the "Run a program or script at the start"-option.
Please find my questions first and find the context (situation and requirements) below:
1. Is it possible to let the "pre-backup"-script conditionally skip the backup? See below: when I'm not at home. if Yes: How?
2. Is "possible to let the "pre-backup"-script check whether today's backup's are already done? if Yes: How?

Script is postscript...
Situation:
  • Going to move my MR-8 license from my 10-years old PC to my new laptop: my new laptop is my "working horse" from now on
  • Backup device at home: Synology NAS (DS918+)
  • take the laptop with me to my volunteer work in an external office at a food bank: no appropriate laptop/PC provided so will use my own. In the office – often the 1st boot of the daymy home NAS is not reachable
  • NAS is off most of the time: I boot it only when it is needed for whatever task, e.g. backup. This is due to avoid wasting of current these days.
Requirements and what I prepared
  • I want to use the MR-scheduler, not the Windows-task scheduler
  • The pre- and post-programs will be powershell scripts.
  • I prepared a pre-backup-script that
  • 1. checks whether I'm on the office network or my home-network
  • 2. if at home it sends a wake-on-lan signal to the NAS and waits till it is up
  • 3. performs the backup
  • I prepared a post-backup -script that shuts down the NAS (ssh-login with elevated privs that gives a shutdown -h now command)
Question 1 (see above) is about skipping everything when I'm in the office
Question 2 (see above) is: avoid unnecessary wake-on-lan of the NAS when I'm at home but the daily backup is already done.

I appreciate any help or suggestion for (one of) these questions
Kind regards,
Hans Troost


jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)
Group: Forum Members
Posts: 14K, Visits: 84K
If you're familiar with PowerShell, I would recommend specifying the desired pre-backup and post-backup scripts using the script generation wizard, then go manually customize the PowerShell script that Reflect will generate to place that logic inside an "If" block with the condition(s) you want to use for determining whether to proceed.  If you want the script to proceed as normal otherwise, then that's all you need.  If you want it to do something different, then add an "Else" to cover that scenario.

Also note that the "Default Run Programs" area just allows you to specify options that will pre-populate in the script generation wizards you might use later on. They are not "policy" definitions that will apply automatically.  If you want a given backup definition file to perform those pre-backup and post-backup tasks, then right-click the definition file, select "Generate PowerShell script", and then in THAT wizard you would specify your pre-backup and post-backup choices.  When you click OK, you will find the script you generated listed under the Scripts tab.  At that point, associate your backup schedules with the script, not the definition file.

Hans Troost
Hans Troost
New Member
New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)
Group: Forum Members
Posts: 2, Visits: 10
Thanks I lot for your reply: that clarifies the concept and way of using the pre- and post-backup-scripts to me, and gives me a better understanding. Coming days or 2 weeks I will further explore this and set everything up.
I will keep you informed about the results as soon as I have everything working - starting with the setup of MR and backup schedules on the laptop - not even started that. So this will take some elapse time - I do this in my spare time - but you will hear from me.

Hans
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search