I am in the process of dismantling an old macOS High Sierra Server and rebuilding it as a macOS Mojave Server.

I've exported Users and Groups from OpenDirectory on the old one and imported them in the new one.

I could move the user's home folders by shutting the old system down, mounting it in Target Disk Mode on the other and using ditto.

But suppose I do not want that and I want both to keep running (e.g. because the old one is still providing services such as mail and DNS) as the new server is still in buildup and contents on it are experimental (final copy done before going live on the new one). The best way I can come up with that preserves everything is creating a DMG on one system, use ditto there and move that to the other and then do the reverse. Both source and target file system are APFS, a DMG will be HFS+.

Is there a better option that preserves 'everything' from the directories copied? It seems to me that tar and zip don't cover everything. I'm uncertain about rsync/rsync --daemon.

Try to ssh into one machine and use cp -avi -p. -i = interactive, -p = preserve directory attributes , -v = verbose. I almost always use cp -avi which preservers structures and attributes of files being copied , with the exception of directory attributes. From man cp

-p: Cause cp to preserve the following attributes of each source
file in the copy: modification time, access time, file flags,
file mode, user ID, and group ID, as allowed by permissions.
Access Control Lists (ACLs) and Extended Attributes (EAs),
including resource forks, will also be preserved....

Are you sure ditto isn't able to do exactly the same? And does this transgress copying across file systems, e.g. via DMG or via network sharing?
– gctwnlAug 30 at 10:38

@gctwnl I will do a complete validation test of ditto, your question put me in doubt now, because you seems to be sure about it. So lets validate it. I will update my answer in case of yes or no, with the results. I will post it here in a few moments.
– PradoAug 30 at 16:41