sudo ditto -vR -rsrcFork /Users /Volumes/Backups/UsersThis example would back up the Users directory to a volume named "Backups". The -rsrcFork option will handle the resource fork of the files during the copy.
I have not tested this myself, and I cannot find any documentation ("man ditto") on the -rsrcFork option. Use at your own risk, but it doesn't look too threatening, as ditto is a copy command.

