rm -rf tragedy

It happened a couple of weeks ago now.  I plugged in my external hard drive “POCKET” and OpenSolaris mounted it under /media/POCKET.  I was going to copy my films and TV series over to POCKET as I was travelling up to see Faye in Aber. 

I started the copy from my Mac, however halfway through my Mac crashed :(   After a restart I decided to start the copy again.  So, my plan was to cd to POCKET and `rm -rf` everything…However, by some horrible fate, I typed the path to my media folder by default and went ahead with `rm -rf *`.

I only noticed about 30 seconds later what was happening…Bit by bit, my data was being de-referenced, left for ZFS to write over it with something else…My first thought was “It’s OK, I’ve got a mirror!”, however, the mirror is, of course, in real time…My second thought was “ZFS snapshots!”, however, they are not enabled by default :(

I have spent the last few weeks slowly re-ripping my collection (though thanks to James as he had copies of a lot of content), I’ve still got a few to do, but I’m mostly there.  I turned on ZFS snapshots too.  I access my server though SSH from my Mac, so here’s what I did:

ben@faegilath>$ ssh -X beleg-ia -l admin
Password:
admin@beleg-ia:~$ time-slider-setup

I was then presented with the screen on the left

As you can see, you can just tick the box saying “enable time slider” and the choose to snapshot all filesystems or select what filesystems you do want to snapshot.

This entry was posted in beleg-iâ, OpenSolaris and tagged , , , , . Bookmark the permalink.

6 Responses to rm -rf tragedy

  1. James says:

    Next time I will charge more for the use off my high availability off site backups!

  2. Ben Lavery says:

    Haha, yes, though hopefully time-slider will look after any more accidents I have!

  3. Aled says:

    That’s what you get for trying to be clever Ben, should have used the GUI!

  4. Ben Lavery says:

    But the GUI is more complicated! Mostly because I can’t get to the desktop anyway….I’ve got no idea where things are and no way of knowing who I’m running what as or anything…

    CLI FTW!

  5. Happens to the best of us. I once managed to chmod -R 0000 / … don’t ask what I was doing, as I can’t remember. All I know is I managed to fix everything in the end, but there is always that moment of panic when you realise just what you’ve done.

  6. Ben Lavery says:

    I realised last night that during this mass deletion, I also wiped a years worth of photographs :(

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>