General discussion

Locked

How to cpio a user dir to remote FS?

By SciFiMan ·
Solaris 2.6 on 3 hosts. All of my users are on one Sun and have /export/home maxed out all the time. I want to divide them up into thirds and spread them out across all 3 boxes. I am exporting the other /export/home/xxx directories which is working, so I can set the user home dir to /net/oswald/export/home/david for example.

My problem is that I need to relocate those users entire home directory tree to the remote file systems. I tried "find david -print | cpio -pdlua /net/oswald/export/home/david" but get the error
Error during access() of "/net/harold/export/home", errno 13, Permission denied. and then the usage.

Is is possible to copy their tree to another box or just locally? Is there another or better way to do this?Thanks!
David

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to cpio a user dir to remote FS?

by cpfeiffe In reply to How to cpio a user dir to ...

I'm more familiar with tar than cpio so I'll give you the tar version that will keep all permissions the same on every file copied.

Whether you use tar or cpio it sounds like you may not have write permission to the exported directory you are trying to copy the files into. You should verify that first. If you have trouble getting to work through the locally mounted export directory it might be quicker to create the tar file local first, ftp it to the other machine and extract it. That isn't the best method, but it will probably save you time.

Here is the tar version:

cd to home directory to be copied
tar cf - . |(cd new_home_direcotry; tar xfp -)

Hope this helps

Collapse -

How to cpio a user dir to remote FS?

by SciFiMan In reply to How to cpio a user dir to ...

Poster rated this answer

Collapse -

How to cpio a user dir to remote FS?

by ghislain.levesque In reply to How to cpio a user dir to ...

Hi, try one of these :

cd fromdir; tar cf - . | (cd todir; tar xfBp -)

or

cd /original_dir;find . -depth -xdev -print | cpio -pdmvu /target_dir

Good luck !

Collapse -

How to cpio a user dir to remote FS?

by SciFiMan In reply to How to cpio a user dir to ...

Poster rated this answer

Collapse -

How to cpio a user dir to remote FS?

by SciFiMan In reply to How to cpio a user dir to ...

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums