Today started as any other day. I started on YouTube and found a clip about a transformer going ballistic after short-circuiting itself.
Before long I was thinking about a huge power outage a few years ago, caused by a fault on a nearby 150kV substation.
I wanted to look up the effect it had on our local grid. One of my inverters keeps track of voltage and other parameters, and I got curious.
And then I fell into the proverbial rabbit hole.
First, I tried to locate my inverter data, but I could not find it in the usual spots.
During the investigation I found out that my do_backup.sh script wasn’t actually backing up my inverter data to my NAS.
So I started fixing that.
And during that process I made one booboo.
While testing the SMB share to my NAS I found out I had made a minor mistake. I wanted to remove the /inverterdata directory, which was still linked to the SMB share.
And I typed:
rm -rf /inverterdata
And pressed Enter.
After about two seconds I realized something was wrong. Deleting an empty directory should take about 0.0002 seconds.
CTRL-C it is.
And then I realized I had deleted my “backups” directory, the one where /inverterdata was linked through SMB.
And yes, I wanted to save my inverter data backups to /inverterdata/backups/[a new directory].
I knew I had configured snapshots on my NAS, so no big deal.
After logging into DSM…
Yay. No snapshots on the Backups directory.
Shit.
Luckily the #recycle directory saved me.
After a few anxious moments I found my data back and restored it to the correct location.
Okay, dodged that bullet.
Back to fixing all of this.
Found the missing data and moved it to the correct location.
Fixed the SMB share.
Fixed the do_backup.sh script.
Tested the backup.
Enabled snapshots on all important shares.
And found the inverter logs from the moment the 150kV incident occurred, including the voltage drop to 180V.
Not bad for a day that started with a YouTube video about a transformer.
Brain out!