The joy of owning yourself!

What was originally a small issue with the latest KDE packages in Debian turned out to be a bit more than I thought it would be. I ran into the dreaded “Initializing Devices” KDE startup issue. After removing all my KDE related directories in ~, it was still broken. I decided finally it wasn’t worth the effort, so I decided I’d revert to my snapshot of the media laptop downstairs from the previous day.

I use Dirvish for snapshot backups, so I have a massive 600GB array filled with nothing but system images and data backups of all sorts. I thought I’d skillfully suck down the previous image in single user mode, hop back into runlevel 2, and be on my way. (Later on, in fact, this worked great…)

However, I failed to properly interrogate my rsync command before executing it. I run it through a few instances of things, but seem to have made a fatal mistake.

# rsync -vvn -aH --delete remote:/backup/current | grep -i deleting | less

So far, so good, I thought. Nothing seemed out of line, only a few deletions. But something was strange. It wasn’t including changes to my /home directory, which I expected it should have. So, anyway, enough with that pesky thinking, of course it’ll work. Fire away! Fire!

# rsync -aH --delete remote:/backup/current /

And we’re off running. I added the trailing slash, not thinking much of the fact that my earlier interrogation was against rsync running with no target directory specified. Hmmm. I wander off to the bathroom and then upstairs.

I discover xmms flipping through songs relentlessly, but finding absolutely nothing. For a second I wonder what silly thing is broken now, but on a whim run an ls on my music directory, just in case. It’s gone! I fall out of my chair and sprint to the fileserver to yank the cable, lest my own stupidity or an intruder finish annihilating my filesystem.

I proceed back downstairs to verify it was my own stupidity in play, having already yanking the DSL connection in case I had been compromised. But the compromise was my own.

I left the laptop downstairs, still trying to contact the NFS server it had just nearly completely ravaged, now unplugged. I yanked its connection upstairs and proceeded to recover NFS and reexport it read-only. With that done, the laptop finally responded, with NFS recovered. I proceeded to correct my mistaken rsync command and the machine was ghosted successfully and KDE loaded without incident.

Upstairs, I took stock of what files were gone and verified what was backed up and where. All the files in question were indeed backed up the previous night, as is so everynight, save the scratch directory where random stuff is dumped. Not considered worth wasted space on the backup server, I leave that directory alone as the file sizes are huge and the turnover rate is somewhat high. In retrospect, with only 45% of my backup volume used, I can afford to backup this directory in the future.

In any event, it was time to initiate the painful fifteen hour recover process over 100Mbps Ethernet to replace the files that were lost in the interval of time it takes to urinate. And now I wait.