Is there a built-in way of copying a node with all it's current attributes and child nodes (with all their current attributes) from a server to a client? I would hope to use this as an easy initialization to make the client match the server, then handle the rest of the communication with RPC calls after that. I understand that this may not exist, probably because several low level attributes should not be exactly duplicated on both systems, but ideally (for me) there would be a way to duplicate this that handles this in a way that doesn't duplicate those low level attributes that it shouldn't.
If such a built-in method does not already exist, are there any (high-level) suggestions as to how I should implement this method on my own? My initial plan would be to iterate over all pieces of the node and child nodes, creating them and setting their parts to the current attributes. And if it's not a built-in method, I would probably want to "whitelist" what attributes and child nodes should be duplicated. This would make adding arbitrary things more work, but I would be afraid of breaking lots of things trying to blacklist the attributes that should not be copied as I'd probably miss things. However, other suggestions would be appreciated. Thank you!