convmvfs to the rescue

I had a hard drive with a huge amount of files that was previously connected to my old Linksys NSLU2. For some reason, all the filenames were encoded in the cp437 codepage, and when I mounted the ext3 volume on my Debian Linux box, the filenames were all messed up. I wanted to mirror the drive without changing anything on it, so I mounted it read-only.

How to solve the file name issue? Enter convmvfs. It is a nice filesystem-in-userspace hack that mirrors an entire file system while converting the file names from one system to another.

$ apt-get install fuse-convmvfs
$ mount /dev/sdb1 /mnt/hugedrive -o ro
$ mkdir /home/linus/myfsys
$ convmvfs /home/linus/myfsys -o srcdir=/mnt/hugedrive,icharset=cp437,ocharset=utf8

Tada! Now I could browse the entire converted filesystem in /home/linus/myfsys, and backup all the files with correct file names.