HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problems with tar & gzip
Operating System - HP-UX
1834346
Members
2136
Online
110066
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-19-2005 04:30 AM
05-19-2005 04:30 AM
problems with tar & gzip
Hello All,
I'm having problems restoring files from tape
( DDS4 ).
*******************************************
I used the following command to place file on tape via following script :
cd ; tar -cvf - . | gzip > /dev/rmt/0mn
*******************************************
*******************************************
I used the following script to place files on tape :
more /home/j4s9389/scripts/korn/targzip/targzip.sh
#!/usr/bin/sh
# Created 051205 - jls
TAPE=/dev/rmt/0mn
DIR=/home/j4s9389/scripts/korn/targzip
cd ${DIR}
cat /dev/null > targzip.out
for FILESYSTEM in `cat targzip.fs`
do
echo "Working on ${FILESYSTEM}" >> ${DIR}/targzip.out
cd ${FILESYSTEM} ; tar -cvf - . | gzip > ${TAPE}
if [ $? -ne 0 ]; then
echo "${FILESYSTEM} had a problem" >> ${DIR}/targzip.out
else echo "${FILESYSTEM} Completed OK" >> ${DIR}/targzip.out
fi
done
exit $0
#
*******************************************
*******************************************
I used the following command to restore data from tape :
# cd ; gunzip < /dev/rmt/0mn | tar tvf -
*******************************************
When I placed the data on tape, I received no errors., but when I restored from tape the restoration started fine, until have way through. Then I received the following errors :
x ./www/htdocs/ito_op/jre/lib/PA_RISC2.0/server/Xusage.txt, 1943 bytes, 4 tape blocks
x ./www/htdocs/ito_op/jre/lib/PA_RISC2.0/server/libjvm.sl, 10735616 bytes, 20968 tape blocks
gunzip: stdin: I/O error
Tar: error! blocksize changed
*******************************************
What did I do wrong ?
I'm having problems restoring files from tape
( DDS4 ).
*******************************************
I used the following command to place file on tape via following script :
cd
*******************************************
*******************************************
I used the following script to place files on tape :
more /home/j4s9389/scripts/korn/targzip/targzip.sh
#!/usr/bin/sh
# Created 051205 - jls
TAPE=/dev/rmt/0mn
DIR=/home/j4s9389/scripts/korn/targzip
cd ${DIR}
cat /dev/null > targzip.out
for FILESYSTEM in `cat targzip.fs`
do
echo "Working on ${FILESYSTEM}" >> ${DIR}/targzip.out
cd ${FILESYSTEM} ; tar -cvf - . | gzip > ${TAPE}
if [ $? -ne 0 ]; then
echo "${FILESYSTEM} had a problem" >> ${DIR}/targzip.out
else echo "${FILESYSTEM} Completed OK" >> ${DIR}/targzip.out
fi
done
exit $0
#
*******************************************
*******************************************
I used the following command to restore data from tape :
# cd
*******************************************
When I placed the data on tape, I received no errors., but when I restored from tape the restoration started fine, until have way through. Then I received the following errors :
x ./www/htdocs/ito_op/jre/lib/PA_RISC2.0/server/Xusage.txt, 1943 bytes, 4 tape blocks
x ./www/htdocs/ito_op/jre/lib/PA_RISC2.0/server/libjvm.sl, 10735616 bytes, 20968 tape blocks
gunzip: stdin: I/O error
Tar: error! blocksize changed
*******************************************
What did I do wrong ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2005 04:39 AM
05-19-2005 04:39 AM
Re: problems with tar & gzip
Quite a slick command you are using but it make s me feel uneasy.
I would do the following.
tar the file
gzip the filed you tar
then copy to tape.
example.
tar cvf /tmp/network.tar /etc/
gzip /tmp/network.tar
tar /tmp/network.tar.gz
This will default and put the file on the default tape drive.
SEP
I would do the following.
tar the file
gzip the filed you tar
then copy to tape.
example.
tar cvf /tmp/network.tar /etc/
gzip /tmp/network.tar
tar /tmp/network.tar.gz
This will default and put the file on the default tape drive.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2005 04:45 AM
05-19-2005 04:45 AM
Re: problems with tar & gzip
1. Use gtar
# cd blah
# gtar -czv -b 40 -f /dev/rmt/0m .
2. use dd as buffer
# cd blah
# tar cvf - . | gzip -9 | dd bs=5120 of=/dev/tmt/0m
Enjoy, Have FUN! H.Merijn
# cd blah
# gtar -czv -b 40 -f /dev/rmt/0m .
2. use dd as buffer
# cd blah
# tar cvf - . | gzip -9 | dd bs=5120 of=/dev/tmt/0m
Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP