Traverse the full tree of the object through their relationship/navigation until it will reach to leaf.
If I've missed something important, I apologize, but your post doesn't seem to really explain why you had to go to such great lengths.
into a backup file and later on it will be attached to database that might be the same database or to another database one with same schema.It will not override existing one if that any data of an object already exist , if not then it will insert the object will related object.
Could that method work in this scenario if you had the object graph loaded by disabling lazy loading?
(PS: Sorry for not directly replying to your last comment, the comment system is giving me difficulty this morning)
Because POCO entities do not have the same relationship requirements as objects that inherit from EntityObject, a slightly different process is required to load related objects. For general information about loading related objects, see Loading Related Objects and Loading Related Objects.