-2

Unfortunately, one of our colleagues executed rm -rf /* command to one of our development servers via SSH and most of our development sites were there.

Is there any way to recover or rescue all those files? Our head still doesn't know it happened.

halfer
  • 19,824
  • 17
  • 99
  • 186
erltarregs
  • 19
  • 1
  • 6
  • 3
    Yes there is: just not let that colleague leave the office until they recover it all. – zerkms Jul 01 '16 at 07:50
  • 1
    You need to inform people immediately - hiding the problem is not recommended. However, if it is a development server, surely it can be rebuilt? Were all the sites pulled from a version control repo? – halfer Jul 01 '16 at 12:41
  • This question would probably be better suited for superuser.com than SO – Tom Myddeltyn Jul 01 '16 at 15:55
  • 1
    You restore from backups, which you have (right?) in case of events such as this and the far more likely case of hardware failure. – abligh Jul 01 '16 at 15:56
  • We had some repository and database backups just for a few. We rebuilt the whole content of the dev server on a new server. :o :D :) Thanks for all your help, guys! – erltarregs Jul 22 '16 at 13:02

1 Answers1

1

You can use TestDisk and PhotoRec to recover the lost files. If they are freshly deleted, that is the drive is not used much after the delete operation then you should be able to recover most of them.

Bishakh Ghosh
  • 1,205
  • 9
  • 17
  • Hi mate, I suggested this and our CEO said not to task that server since then. We rebuilt everything on a new server, with automatic backups setup already. Thanks for the advice! – erltarregs Jul 22 '16 at 13:03