In last week I made a mistake by deleting some documents on a server which runs FreeBSD. Three seconds after I typed "rm -r *.*" and pressed Enter, I'd realized I made a big mistake. There is always a thing called "recycled bin" in Windows or GUIs in Linux, but not for such a situation with text command. So, I searched in my poor memory and tried finding some tools under FreeBSD just like "undelete" under sweet DOS. The only result and choice is: testdisk.
Exactly saying, PhotoRec, which can be downloaded here.
It's really sad for me to find out that there is only FreeBSD port for testdisk, which can be easily installed by typing "pkg_add -r testdisk", but not for PhotoRec. The only way is downloading the source and compiling by yourself. I must admit that I didn't make it done. So I was almost mad when I realized there is no kind of softwares that can rescue the deleted files under FreeBSD.
The solution to this disaster: for some luckies I made a backup before several months and it includes the files that I deleted! So here is the lesson I've learned: ALWAYS make backups before you do something! Today is just losing some files, what happens if our hard disks die?
Like some words I saw elsewhere:
Love, just like you've never been hurt,
Live, just like you will die tomorrow,
Sing, even if nobody is listening.
We can add an extra line to that:
Backup, 'cause you will never know when your hard disks want to die.
No comments:
Post a Comment