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

Posted on 2013-05-20
Medium Priority
Last Modified: 2013-05-21
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.

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.
Question by:RDiersing
LVL 32

Accepted Solution

serialband earned 2000 total points
ID: 39182413
rsync will do it.

rsync -a /local_dir/ /mounted_dir=

To restore just switch the order:
rsync -a /mounted_dir/ /local_dir/

Author Closing Comment

ID: 39186268
Thanks very much for your help.
I tried rsync today in both directions and it worked fine for me.

Featured Post

Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

A basic introduction to Website Security and the absolute minimal steps that anyone should take in order to protect against hostile intrusions. This is offered as a guide to getting started, not an exhaustive list of all precautions. Enjoy...
Cloud computing is a model of provisioning IT services. By combining many servers into one large pool and providing virtual machines from that resource pool, it provides IT services that let customers acquire resources at any time and get rid of the…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question