- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Copy NIS home directories to different server ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 09:12 AM
11-21-2007 09:12 AM
I am trying to copy NIS home directories from one server to another. I am taking the box down and need to move the directories somewhere else.
I have tried cp -pr /source /mnt/destination.
That does not preserve permissions.
I have tried
tar -cpf - input | (cd /dest; tar -xpf -)
Is there a better way than this that someone can please suggest.
I have to move about 150 directories.
Thank you
James
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 10:38 AM
11-21-2007 10:38 AM
Re: Copy NIS home directories to different server while preserving permissions.
"cp"? Ptui.
> I have tried
> tar [...]
And did it work?
That's the way I'd probably do it, but from
HP-UX to HP-UX, a similar fbackup - frecover
pipeline might have some advantage.
"man tar" suggests that the first "p" (the
one with "c") may have no effect.
> I have to move about 150 directories.
Moving many bits can take a while, no matter
how you do it. If you have fast CPUs and a
slow network, throwing some compression and
expansion (say, gzip) into the pipeline could
pay.
NIS doesn't really matter here, does it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 10:48 AM
11-21-2007 10:48 AM
Re: Copy NIS home directories to different server while preserving permissions.
>Steven: throwing some compression and
expansion (say, gzip) into the pipeline could
pay.
I don't see any remsh, so where would gzip help?
>NIS doesn't really matter here, does it?
Perhaps James meant NFS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 11:20 AM
11-21-2007 11:20 AM
Re: Copy NIS home directories to different server while preserving permissions.
What I meant was that I tried cp -pr from the source( an HPUX 10.20 box with NIS user home directories exported through NFS)
to a network appliance, did not work. Permissions are set to the nobody user..
I have root access on both..so then I tried from inside a home dir
tar -cf - . | (cd /destination ; tar -xf -)
to a destination homedir owned by the same user. The files are nobody(65344) owned still.
and I tried from inside source homedir again.
find . | cpio -pudlmv /destination home dir
The permissions are set to nobody or 65344 after the copy or tar or cpio function.
Could it be that it is a network appliance as the destination?
Should I be using what you posted as
cp"? Ptui
Thanks
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 12:50 PM
11-21-2007 12:50 PM
SolutionThat's why I asked. You have root as nobody access, less than a normal user.
Since you have root on the network appliance, you need to export root as root. (Then change it back.)
See the following exportfs(1m), root=hostname[:hostname]...:
http://docs.hp.com/en/B2355-60103/exportfs.1M.html
(I have no idea how your network appliance exports, you may have a fancy GUI?)
Note: If you can't figure this out, you can always copy a tarfile over then untar it.
>tar -cf - . | (cd /destination ; tar -xf -)
You can simplify this by using:
$ cd /destination
$ tar -cf - -C source . | tar -xf -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 12:55 PM
11-21-2007 12:55 PM
Re: Copy NIS home directories to different server while preserving permissions.
(Or is that what you are doing?)
My home directory is like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 04:15 PM
11-21-2007 04:15 PM
Re: Copy NIS home directories to different server while preserving permissions.
The netapp is relatively new so that is why I am putting the home directories there now. Gonna retire this 10.20 box. I am also moving the NIS services to a different box but before I do so I wanted to have all the home dirs off.
Thanks again for the advice on pre turkey day.
I sure do appreciate it.
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2007 04:21 PM
11-21-2007 04:21 PM
Re: Copy NIS home directories to different server while preserving permissions.
Anyhow Thanks Dennis.