3

I'm doing a NAS data migration from a Celerra NS960 to a Unity 500. I have an SMB/CIFS file system I synced using EMCOpy in Windows environment. It's also an NFS (multiprotocol) file system. I have both file systems mounted on a Solaris 10 UNIX server can I just rsync the permissions only from the NS960 to the Unity and not have all the data copy again?

4
  • Given that the accepted answer (over there) bends over backwards to disable recursion (and explains how it does it),  I believe that it’s a dup. Commented Oct 13, 2018 at 2:29
  • Well, this seems to be a common meta-problem: Person A asks question X and accepts an answer.   Person B asks question Y which is the same as question X but says “That answer doesn’t work for me.”   What to do, what to do?, as Pooh would say.   Do we tell Person A to earn 100 rep points and put a bounty on question X?   The Stack Exchange system doesn’t seem to handle cases like that well.   Do you believe that I should withdraw my vote (VTC as dup)? Commented Oct 13, 2018 at 17:20
  • 2
    Suggested duplicate does not extend from a single directory to a tree of files. The alternative doesn't work on Solaris. Not a duplicate. Commented Oct 16, 2018 at 6:27
  • Related, but also not a dup - Can rsync fix time stamps without redownloading? Commented Oct 4, 2022 at 7:06

2 Answers 2

0

Interestingly, the question in the linked possible duplicate (which, IMO isn't a dup) gives the clue to an answer that will work for you if you have GNU coreutils that includes cp. Solaris cp doesn't have the --attributes-only option so you can't use this "out of the box".

cp -a --attributes-only srcdir/. dstdir
0
-1

As answered elsewhere, how does:

rsync -ptgo -A -X -d --no-recursive --exclude=* first-dir/ second-dir

not achieve the goal?

As stated,

This does:

-p, --perms                 preserve permissions
-t, --times                 preserve modification times
-o, --owner                 preserve owner (super-user only)
-g, --group                 preserve group
-d, --dirs                  transfer directories without recursing
-A, --acls                  preserve ACLs (implies --perms)
-X, --xattrs                preserve extended attributes
    --no-recursive          disables recursion

For reference

    --no-OPTION             turn off an implied OPTION (e.g. --no-D)
-r, --recursive             recurse into directories
3
  • This applies to a single directory, not to a tree of files as described in the question. Scenario mkdir -p a a/b; touch a/a1 a/b/b1 a/b/b2; cp -r a x; touch -t 201810130000 $(find a -depth) source is a target is x. Commented Oct 13, 2018 at 14:26
  • Does it work (i.e., do what this OP wants) for a single directory? Could it be successfully coupled with find -type d -exec? Commented Oct 13, 2018 at 17:20
  • @G-Man it affects the directory, not its files. Commented Oct 13, 2018 at 17:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .