DPM Management - Part 2


                                         We all have different options at everything. Now you have two here - Read through or go for the script.



Read DPM Management - Part 1 if you need to. Strictly a personal choice

The Beginning - A super-tiny walk through:

The script-ish piece of code referenced in Part 1 was based on a set of purely raw requirements; Backup Admins(Henceforth referenced as BA) needed a power-tool to free up the space and get rid of the alerts - Simple & Personal. The script however had a big pitfall (among numerous others) - It could not be scheduled to run, as it needs human intervention to get things done. Not fancy enough for the lazy BAs, but good enough for the cautious lot.

Need for Greed - Strike I:

Automation infests on the laziness of the mankind. Every single time man feels remotely lazy, someone/something finds its way to make man get used to this slumber.



The idea of lesser manual intervention has thrived at every workplace - mine is no exception either.
The requirements were on two fronts- Maximum number of restore points and/or cut-off date for backup sets.
So the script need to read parameterized input and blindly delete backup sets - the risk falls with whoever gave it a go (Not a warning, but a disclaimer). Since this idea imbibed from the ability to be run as a scheduled task, fail-safe measures would meddle with a otherwise-smooth execution. P.S. Strike I 😐

MadMax - Strike II:

Setting up a logic for the maximum number of permissible recovery points were quite easy, but the challenge was looping through the code to only delete what is intended to. I remember not even able to write a simple java code-let to print Fibonacci series in the Engineering Computer Lab - And I still cant. However, I've bettered my self on one front - finding and integrating stuff. I'm more like the Alexa which could do wonders when it has access to the internet.


Some fail-safes are commented-out, so its technically a hurricane once it starts deleting.
I'd personally be more embarrassed with having no backups at all than having less space to take new backups - Strike II 😑

Dating - Strike III:

Adopting the cut-off date was a bit more complex than I expected; Starting from getting date format input, processing it, and finally subtracting dates. I've never been good with Dates anyway 😕

The script finally came up fine. My definition of Fine = no reds in the PS Terminal.
Turns-out the script was picking up dates in an undesired fashion - Like it'd read dd/mm/yyyy even when the server's date-time format was mm/dd/yyyy.
A fail-safe option for now was to skip this module, and thus this functionality. - Strike III 😒

Script :

This script has the same name as the script referenced in Part 1, but under a different git branch altogether. - MABS_RPdel.ps1

Take Aways:
  1. Integrating code-lets is fun, unless the requirement is immediate.
    1. Looping is fun as well, until you know what it does in the entirety.
    2. Dating is risky, unless you know the date-format you're dealing with! 













    Comments

    Popular Posts