- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- newbie - CPIO restore problems
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-24-2003 12:19 AM
11-24-2003 12:19 AM
newbie - CPIO restore problems
Hi All !
I have a problem with cpio restore options.
I want to be able to restore data to a temporary directory and not to its original location.
any attempts I did using -p options have failed ....
any ideas ? .......
any help will be highly appreciated !
Thanx,
Jennie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2003 12:41 AM
11-24-2003 12:41 AM
Re: newbie - CPIO restore problems
In your case, the easiest tool wouldn't be cpio, but rather 'pax' which is used by ignite UX and can read tar as well as cpio archives. Th most important feature is the 's repl_string' which allows you to subsiture patterns in restore paths. I use it especially for archives created with absolute paths. You can even find examples in the man page.
Best regards,
Jean-Louis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2003 12:47 AM
11-24-2003 12:47 AM
Re: newbie - CPIO restore problems
I have just tried this:
# pax -rv -s'/^\///' < your_cpio_archive
and it extracts everything from your_cpio_archive and writes it to your current directory. I is perhaps also possible to use pax with the -i option for interactive mode.
regards,
John K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2003 12:58 AM
11-24-2003 12:58 AM
Re: newbie - CPIO restore problems
This is unworkable for large archives, unless you like typing...
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2003 02:06 AM
11-24-2003 02:06 AM
Re: newbie - CPIO restore problems
One quick question/suggestion.
Is the path on the tape an absolute path or relative.
If the path begins with / then its absolute and will cause you some issues.
If the path begins with a directory or filename eg tmp/ or data/ etcetera then you can cd to where you want the files restored and run the cpio command without problems.
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2003 11:42 AM
11-24-2003 11:42 AM
Re: newbie - CPIO restore problems
cd /tmpdir
cpio -idmu < /location/cpio.file
the p would be used if the directory already exists. Let say after you restored it to a tmp dir and you want to put in another directory
cd /tmpdir
find . -print |cpio -pdmu /another_directry
good luck
Rory