- Copy or rename the example configuration file
snapraid-script.psd1.example
tosnapraid-script.psd1
- Configure
snapraid-script.psd1
as desired- If you enabled email notifications you need to run the script once to generate secure credential file
snapraid-script.cred
. The script will send a test email to check if your credentials and smtp configuration are correct.
- If you enabled email notifications you need to run the script once to generate secure credential file
- Try to load configuration file
- If notifications are enabled, try to load credential file
- If credential file does not exist, prompt user to generate a new one
- Exit
- Run
diff
- Parse output
- If number of deleted files exceeds configured
Snapraid.Diff.DeleteThreshold
, abort the script - If any changes are detected, run
sync
- Run
scrub
with--plan
and--older-than
parameters from configuration file - Run
status
- Send
SUCCESS
notification email
Issues and pull requests are welcome.