- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cpio help
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
05-23-2005 02:36 AM
05-23-2005 02:36 AM
I want to duplicate the home dir of a RH linux server onto another linux machine. I have scp'ed the entire dir over however this does not preserve permission or ownership rights.
I believe cpio can effectively do this however I have never used cpio before. The man pages mention how to cpio a dir to a new dir but can I alternatively use cpio to create a file that I can scp to the /home dir of my other server and import so that the entire sub dir structures will be identical and username/permissions will be in tact?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2005 02:41 AM
05-23-2005 02:41 AM
SolutionOn the source box,
cd to desired starting directory
find . -print | cpio -ocv > /tmp/xxx.cpio
or
cd /
find /home -print | cpio -ocv > /tmp/xxx.cpio
Now ftp, rcp, or scp /tmp/xxx.cpio to the target machine.
On the target machine:
cd to desired starting directory:
cpio -icvdum < /tmp/xxx.cpio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2005 02:42 AM
05-23-2005 02:42 AM
Re: cpio help
You can create a tar archive and then scp it to the other system and untar the archive over there.
Is that possible.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2005 02:43 AM
05-23-2005 02:43 AM
Re: cpio help
â p Preserves modification times, access times, and modes from the original file.
For cpio it would be something like
hosta# find . | cpio -ocv >/tmp/xx.cpio
hostb# cpio -iuvdma
Enjoy, Have FUN! H.Mer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2005 03:29 AM
05-23-2005 03:29 AM