1834478 Members
3259 Online
110067 Solutions
New Discussion

cp and hold permissions

 
SOLVED
Go to solution
Oliver Schmitz
Regular Advisor

cp and hold permissions

Hi, I have an error in my RAID system and have to cp my data to aa additional disk. How can I copy without changing the permissions to the umask of the copiing user (its root in this case)?

Thanks and regards,

Oliver
Oliver Schmitz
2 REPLIES 2
Pete Randall
Outstanding Contributor
Solution

Re: cp and hold permissions

Oliver,

Is this a file system? If so, you can use find with cpio like this:

cd /mount_point
find . -print |cpio -pdumxl /new_location

Or you can use conventional backup/restore methods like fbackup.


Pete

Pete
Patrick Wallek
Honored Contributor

Re: cp and hold permissions

Have a look at the '-p' option of cp. You could use tar as well. Even cpio would work.

# cp -Rp /source/dir /destination/dir

# cd /source
# tar -cf - . | "cd /destination ; tar -xf -"