View Full Version : How to undo unlink operation
mukembo
January 2nd, 2009, 17:09
The other day while punching away at the keyboard, an interruption from a relative resulting in my executing "rm -r /*".
I've found that that unlinked most of my file system from the root.
I run the command while in sudo mode hence as part of the wheel group.
Any suggestions on how to undo this operation? I've tried undelete, rm -r -W and loads others but none seemed to function.
Its urgent as this was a live machine on which I was doing regular maintenance on a separate application.
trev
January 2nd, 2009, 23:09
The only 'undo' operation in this sort of case is called BACKUPS. I hope yours were current.
mukembo
January 3rd, 2009, 09:57
Trev,
I did have some backups but given that my only current access method to the server is SSH (servers and I are about 900miles apart), I've got to find a way to undo this while bypassing the backup restoration.
Since I've got a full backup of the system, though about 2 months old, can I attempt an upgrade from my current version 6.2 Stable to say 7?! Will that, with proper pre-installation configuration, restore the linkages?
Djn
January 3rd, 2009, 15:14
Basically: No. The unlinked files are lost, unless you use something like what's discussed here (http://forums.freebsd.org/showthread.php?t=940) to recover them - and even if you do, the success rate isn't that good.
If you didn't lose any data you don't have backed up, I'd start reinstalling (or restoring from backups).
If you did, try to recover it with some of those tools first, and good luck.
trev
January 4th, 2009, 06:35
If you're going to upgrade from 6 stable to 7.1 stable, this posting will be invaluable:
http://people.freebsd.org/~rse/upgrade/freebsd-upgrade-6x-7x.txt
Good luck.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.