- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dd and cpio
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
09-20-2007 07:13 PM
09-20-2007 07:13 PM
I found the following info usng the bellow command, however my brain is not working and I dont see how to use the same commands to list and restore the files....
Anyone have suggestions for me thanks
find /dir1 /dir2 /dir3 /dir4 /dir5 -depth | cpio -ov 2> /daily_files/`date -u +%d%b%y`.data | dd of=/dev/rmt/2m obs=1024k
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=856576&admit=-682735245+1190358717477+28353475
Solved! Go to Solution.
- Tags:
- cpio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 07:26 PM
09-20-2007 07:26 PM
Re: dd and cpio
dd if=/daily_files/`date -u +%d%b%y`.data of=/dev/rmt/2m obs=1024k
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 07:29 PM
09-20-2007 07:29 PM
Re: dd and cpio
Thank you for your prompt response, but I think I already placing the data to the tape in my command, what I want to do is read from the tape...
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 07:32 PM
09-20-2007 07:32 PM
Re: dd and cpio
dd if=/dev/rmt/2m ibs=1024k | cpio -ivt
To restore:
dd if=/dev/rmt/2m ibs=1024k | cpio -idm
I assume obs= and -B are not required since you are sending it through the pipe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 07:41 PM
09-20-2007 07:41 PM
Re: dd and cpio
obs=5120 | cpio -idmB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 11:48 PM
09-20-2007 11:48 PM
Re: dd and cpio
I'm trying to get the #Replies counter for this thread to increment itself.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2007 02:08 AM
09-21-2007 02:08 AM
Re: dd and cpio
Thank you for your reply, I will test your suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2007 04:04 AM
09-21-2007 04:04 AM
Re: dd and cpio
I tried the commands you suggested. I will think it should work however i got the following error:
# dd if=/dev/st0 obs=1024k | cpio -ivt
dd: reading `/dev/st0': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3.02205 seconds, 0.0 kB/s
cpio: premature end of archive
Any ideas...
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2007 05:13 PM
09-21-2007 05:13 PM
Re: dd and cpio
I had problems with this thread too. It would disappear and then it would still have 0 replies. ??
>I tried the commands you suggested. ... i got the following error:
# dd if=/dev/st0 obs=1024k | cpio -ivt
dd: reading `/dev/st0': Cannot allocate memory
I had ibs=1024k.
Also it appears you are using some foreign devil dd(1) because HP-UX's version doesn't print "Cannot allocate memory" or "0 bytes (0 B) copied, ...".
- Tags:
- foreign devil tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2007 11:56 PM
09-22-2007 11:56 PM
Solutionthe name of the device file '/dev/st0' sounds to me like you work on Solaris.
Is there a remsh/ssh connection in play?
If all is local, it should not be necessary to use dd at all; your command should be identical to
find /dir1 /dir2 /dir3 /dir4 /dir5 -depth | cpio -ov 2> /daily_files/`date -u +%d%b%y`.data >/dev/rmt/2m
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2007 12:49 AM
09-23-2007 12:49 AM
Re: dd and cpio
That would be pretty foreign. :-)
>If all is local, it should not be necessary to use dd at all;
Won't that have a trivially small block size, that's why they had tcio? At least -B should be used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2007 05:02 AM
09-23-2007 05:02 AM
Re: dd and cpio
Dennis' remark should be included, Juan.
Give that a try:
find /dir1 /dir2 /dir3 /dir4 /dir5 | cpio -oBv 2> /daily_files/`date -u +%d%b%y`.data >/dev/st0
For verification, nothing has to be changed:
cpio -ivt
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2007 02:42 PM
09-23-2007 02:42 PM
Re: dd and cpio
Shouldn't that have a -B too? -iBvt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2007 03:38 AM
09-24-2007 03:38 AM
Re: dd and cpio
First of all you were right, this is not HPUX. My apologies I thoug that dd and cpio will be the same in any platform.
I guess I was wrong the linux cpio is a GNU.
That explains the error reported.
At the end I used tar for some reason I was able to save the data (140GB) onto tape using cpio however I was unable to restore the data.
Thanks all for your advise.