The story:
I am using Ubuntu for my website.
For a backup plan, I wrote a script. I wanted to mount an external drive, (run through crontab), backup the server, and then umount it, every night.
I noticed that through fdisk -l I got:
/dev/sda
/dev/sdb
To be sure, I ejected the external drive, and saw this:
/dev/sda
I assumed /dev/sda was my server's disk.
I then plugged in the external. Created a directory in /mnt/GBackup_plan
mounted it:
mount /dev/sdb1 /mnt/GBackup_plan
Then it happened.
I wanted the external to be clean...
I then run the command:
rm -r *
I did it all inside GNOME, and I started to see the environment starting to lose stability, and only then I realized that I did a horrible horrible mistake, although I still don't know why... (sdb was the external, no?!)
Because of this mistake it so happened that all my backups, everything was actually NOT in the external, but on the original disk...
So turns out I erased the root of my server!!!
I ran Hiren's Boot CD, using TestDisk
, and examining the filesystem, I can see the Root of the filesystem, but when I go into the folders they are empty. Perhaps I should do another step before listing/copying? Analyse maybe?
I am wish someone has an idea of what I should do.
I should say that I stopped the command using ctrl+c and turned off the computer. Took the disk out.
Any help would be appreciated!!!