Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The debugfs manpage gives the impression that the command 'rdump . .' will recursively copy all files found on the specified filesystem from the debugfs cwd to the native filesystem's cwd. Instead I seem to receive a syntax error, and no copy is initiated?

These are the commands I run:

cd /path/to/transfer/destination
debugfs /dev/sda1 -R rdump . .

My task is to copy the entire contents of a clean yet unmountable USB storage device to its host machine's HD. The host machine does not support the inode size used by the USB device's filesystem (256) and its software is not upgradeable, so my intention was to use debugfs to transfer the files. If anyone has any other suggestions for this task I'd be grateful.

share|improve this question
I hate this question. – ewwhite Oct 10 at 5:18

2 Answers 2

How about this?

debugfs /dev/sda1 -R "rdump / /path/to/transfer/destination"

I haven't tested that, as I don't have something to test it on, but TFM seems to imply this is more correct. Actually, you might want to swap arguments around to better match what the man page suggests:

debugfs -R "rdump / /path/to/transfer/destination" /dev/sda1

I don't know if that matters, but it could.

share|improve this answer

I don't see the reference to current working directory in the man page for the version I have. The cwd (pwd) is significant in the shell and has no meaning to a device (unlike Windows where each drive has a cwd). I would recommend trying to completely specify both the source and destination directories. Why not use tar or dd or rsync?

share|improve this answer
I assumed the "." would be effective since "ls -l" within debugfs gives me a file listing including "." and ".." , both of which return the device's root directory contents if used in conjunction with ls. I can specify each directory in the device's root explicitly and it copies all content recursively, but I was hoping to come up with a solution that requires less input. I couldn't find any documentation on using tar, dd or rsync for the purpose of my task? Thanks for the reply! – tjbp Jun 18 '10 at 8:35
dd is the way to go if you cannot mount the partition first. – Warner Jun 18 '10 at 13:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.