• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

Preserving uid, gid, size, etc. when coping to an NFS mount point

Hello,
I have read several posts on preserving attributes when copying to an NFS mounted file system, however, I haven't arrived at a method to try yet.
What I want to do is copy portions of directory trees with all their files to another NFS mounted file system on a different system for backup purposes.  The restore process needs to be straightforward should I ever need to do that.
Since my work on the systems does not affect anyone else, I can disconnect from the external network while doing the copies if there is a method that is easy but unsecure.  In other words, I would return the systems to their original state security-wise when the copy operations are finished.
Thanks for any suggestions.
Robert

P.S.
Source machine OS: Linux Kernal 2.6.18-164.6.1.el5xen
Destination machine OS: Linux Kernal 2.6.32-279.9.1.el6x86 64 on Centos release 6.3 (Final)
Source is on Centos too but version not available to me at the moment but I know it is < 6.
0
RDiersing
Asked:
RDiersing
1 Solution
 
serialbandCommented:
rsync will do it.

rsync -a /local_dir/ /mounted_dir=

To restore just switch the order:
rsync -a /mounted_dir/ /local_dir/
0
 
RDiersingAuthor Commented:
Thanks very much for your help.
I tried rsync today in both directions and it worked fine for me.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now