From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,af0d0ffe1590e9b8 X-Google-Attributes: gidfee84,public X-Google-Thread: 1020c6,af0d0ffe1590e9b8 X-Google-Attributes: gid1020c6,public X-Google-Thread: 11ee88,af0d0ffe1590e9b8 X-Google-Attributes: gid11ee88,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: recover deleted files in Digital UNIX Date: 1999/07/20 Message-ID: <7n2adc$dr4$1@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 503200457 Distribution: world References: <37944E3F.ED5D8B7A@murdoch.edu.au> Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Newsgroups: comp.unix.admin,alt.unit.wizards,comp.unix.osf.osf1 In article <37944E3F.ED5D8B7A@murdoch.edu.au>, Hong Xie writes: >I accidentally deleted a directory containing many important files. >I wonder if anyone know whether and how I can recover those files. The usual first choice is to restore them from the most recent backup. To be honest, if they weren't important enough to backup, they must not have been that important... I do release there are cases where the files may have changed significantly between regular backups. >I am using a Digital Alpha workstation running Digital UNIX v4.0. >The filesystem type is UFS. I have root user privilege. There is an option, but the ease of recovery depends on the data. The blocks of the deleted files went back to the free space. The location of the free space is kept as a bitmap by UFS on a per-cylinder group basis. Files in a directory tend to be in the same cylinder as the directory. For small and medium sized files the odds are good that all the data is in the same group as the directory, limiting the number of free blocks that have to be searched. At gatekeeper.dec.com:/pub/sysadm is an archive called recover.tar.Z. This program will search the free space of a UFS for text like data and write it to stdout. If a hint about which cylinder group to look in is given, it will only search that cylinder group. It needs read access to the raw device the file system is on, which root has. The routine that identifies interesting data can be customized if you have a way to recognized other types of data. If the file system your data was on is busy, those blocks may have been allocated to something else. On the other hand, other directories will tend to be on other cylinder groups, and will prefer to use the blocks of those other groups. > >I would appreciate you for any information. Many thanks. Good luck and if you're not making backups of supposedly important data, do so. > >Hong Xie >h.xie@murdoch.edu.au > -- Alan Rollow alan@nabeth.cxo.dec.com