The answer you linked to was wrong - not even remotely close to correct. The attributes preserved by
cp are ONLY filesystem attributes (ownership, timestamps, permissions). file metadata is completely unrelated.
There isn't any easy way to copy application-specific data like
evince's bookmarks to another system. The bookmarks aren't stored IN or with the file, they're stored by evince using GIO.
You could extract the metadata with
gio info, store it in a file, and then restore it on the remote system. For example, if using
scp to copy the file on the remote host:
gio info -a "metadata::evince::bookmarks" filename.pdf |
sed -n '/metadata::/ s/^.*: //p' > filename.bookmarks
scp filename.pdf filename.bookmarks user@remote:/path/to/store/file/
Then, on the remote system:
gio set filename.pdf 'metadata::evince::bookmarks' "$(cat filename.bookmarks)"
BTW, variations of this method can probably also be used to restore GIO metadata to files if you've used standard unix tools (like
mv) to copy or move the files around, rather than staying within GIO-aware applications like