Jump to content

Preseving permissions whilst copying (remote destination)


Recommended Posts

Posted

Hello all, I hope this isn't too similar to http://www.edugeek.net/forums/mac/18043-how-do-you-copy-folder-preserve-ownership-permissions.html - I didn't want to bump that thread as it discusses 'local' copying which works fine.

 

We have an iMac that is playing up and not using remote home directories properly and instead the users directories are store on the machine itself - I wanted to grab all the work off this machine and simply re-image it.

 

I didn't get the the re-image part yet since I have not been able to get the /users folder off the machine with the permissions etc preserved.

 

I think I know what the problem is, but im not sure how to solve it or a method that doesn't 'cause' the same result. My method is the ssh to the machine in question then:

 

mkdir /remote
mount -t afp afp://user:pass@remotemachine/share /remote

 

Then I tried to just

 

cp -pRL /users /remote

 

But that didn't seem to preserve the permissions as I had hoped, next tried:

 

ditto /users /remote

 

Apart from now having hundreds of folders on my share instead of a users/lots of folders (it seems ditto is quirky!) I still didn't have the files with their permissions.

 

At this point I noticed that it seems to be just giving ownership to the user I mounted the share with! What am I doing wrong?

 

Cheers,

 

Nick

 

PS - We probably don't need *every* single file/folder, but its a pain to get feedback on what needs to be kept and chown it all manually once restored - besides I wouldn't mind knowing how to get this process done alot faster in the future!

Posted

Hi Nick

 

Use rsync - man rysnc (from the command line). Its what it was designed for.

 

There's already a thread posted my HodgeHi that mentions its use I think?

 

Antonio Rocco (ACSA)

Posted

Forgot about rsync!

 

I've updated the two machines in question to rsync 3.0.6, which means installing xcode etc to compile, is the 'default' rsync that bad? (For future 'rescue' missions) I'd rather not add 2gb to our install images 'unecessarily' unless anyone can point me to a guide to installing 'enough' to compile things?

 

Don't suppose it really matters in the long run, will keep trying!

Posted
Are they local users or network users? ACLs or unix permissions? You can create a dmg from the folder with disk utility and see if that preserves what you want, although it depends if the user has the same UID on both locations.
Posted
This is for network users, im not entirely certain how the permissions are applied (Toucan login scripts) but they seem to be unix permissions...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...