How to copy metadata of all files in a ext4 filesystem.

You can also write a user-space program with ext2lib to achieve such task.
Have a look at giis-ext4 from here http://www.giis.co.in/giis/ - user-space program 
which stores inode details on a sqlite db using ext2lib.

HTH
--
----
Cheers,
Lakshmipathi.G
FOSS Programmer.