I got requirement to create mirror image of existing Linux directories and sub directories of folders as below.
we have "/opt/current" directory which has another layer of 20 sub directories and one more layer with 50 sub directories and so on...few more deeper layer for sub-directories and total we have 1000 directories from parent to child. the /opt/current is mounted on Oracle ZFS appliance.
How to create exact mirror directories/sub-directories structure in new location /opt/New not manually like one to one directory and apply permissions. the /opt/New is mounted on another ZFS appliance.
Is there a way/script to create entire directory structure from parent to child with same owner/group/other permission in /opt/New path as in /opt/current path?