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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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

marked as duplicate by ewwhite linux Jan 13 at 15:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I hate this question. – ewwhite Oct 10 '15 at 5:18

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
    
Quoting ram.kossboss.com/… "If your wondering is there a way to do “ rdump / . ” The answer is no. Thats a lack of the program, so you have to rdump every folder and file on the root one by one as already explained above" – barrycarter Dec 21 '15 at 16:52

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

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