# filesystem rebuild

## 22decembre

hi !

I have recently done

```
cd /sdb3

mv * /sdc2
```

but after, the files in /sdc2 disappeared/were corrupted. As far as I understand, files are still in /sdb3, but not indexed anymore. Is there a way to recover them/rebuild the index, or at least fetch again the big ones (films about 1 giga … )

thanks in advance

----------

## NeddySeagoon

22decembre,

mv does the copy then unlinks the space that was occupied by the file, so as you say, the data is still there, just not connected to the file system any more.

You must not allow /sdb3 to be written to as any writes may overwrite the data you want to recover.

If and how you recover the data depends on the filesystem on /sdb3

You also need a lot of luck and probably time.

----------

## 22decembre

the fs was ext4, what can I do ?

----------

## NeddySeagoon

22decembre,

I know nothing of ext4 internals, however, google suggests [url=http://extundelete.sourceforge.net/]extundelete[/ur]

Its also in portage so 

```
emerge extundelete
```

If you have space, you may want to make an image of /sdb3 before you start as you will have no 'undo' function if it fails.

----------

## 22decembre

it is working now. It seems really powerful and efficient ! I can't yet read the files, but I get files and dir names !

Maybe I will give few € to extundelete guys …

----------

