- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TAR problem
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
02-21-2002 04:49 AM
02-21-2002 04:49 AM
TAR problem
When I try to do a "tar xvf backup.tar" I received a error like: blocksize changed and stop the extract action.
I hope you can help me...
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 04:51 AM
02-21-2002 04:51 AM
Re: TAR problem
What do you get when you do this:
tar -tvf backup.tar
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 04:55 AM
02-21-2002 04:55 AM
Re: TAR problem
I got a message like : "directory checksum error".
It??s really strange. Maybe I should define a blocksize when doing "tar cvf ...", ok ?
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 04:56 AM
02-21-2002 04:56 AM
Re: TAR problem
Try tar cvf /tmp/backup.tar ./
and then tar xvf /tmp/backup.tar
That should work...
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 04:59 AM
02-21-2002 04:59 AM
Re: TAR problem
where is the backup.tar file located?
Keep it away from the directory for which you are taking backup and retry.
Ex.
tar -cvf /back/backup.tar /home
this backs /home directory into the file /backup.tar in the folder /back.
Seems to be path problem. Excuse me, if it is incorrect!
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:03 AM
02-21-2002 05:03 AM
Re: TAR problem
If you used a no rewind device that could cause problems since you are at the end of the archive.
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:06 AM
02-21-2002 05:06 AM
Re: TAR problem
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:07 AM
02-21-2002 05:07 AM
Re: TAR problem
Also try the w option in the restore
Then it will ask before restoring a file.
Give n every time and it will step through the archive.
Remember fbackup is a better tool.
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:09 AM
02-21-2002 05:09 AM
Re: TAR problem
The other thing you could try is not to put the / after the dot. When I use tar I never put that ending /.
tar cvf backup.tar .
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:11 AM
02-21-2002 05:11 AM
Re: TAR problem
Ex.
mkdir test
cd test
tar -xvf /path/backup.tar
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:16 AM
02-21-2002 05:16 AM
Re: TAR problem
THe problem is that your backup.tar file is also in the backup.tar file, and when it attemtped to restore it it clobbered the backup.tar file making it useless, I tested exactly what you did:
# ll
total 20360
-rw-r----- 1 root sys 1689600 Dec 24 10:19 cvs-1.10.8-sd-11.00.depot
-rw-r----- 1 root sys 8734720 Dec 24 10:19 cvs-1.10.8-ss-11.00.tar
drwxr-xr-x 2 root root 96 Aug 13 2001 lost+found
# tar -cvf backup.tar ./
a ./cvs-1.10.8-ss-11.00.tar 17060 blocks
a ./backup.tar 17060 blocks
./backup.tar: file changed size
a ./cvs-1.10.8-sd-11.00.depot 3300 blocks
# tar -xvf backup.tar
x ./cvs-1.10.8-ss-11.00.tar, 8734720 bytes, 17060 tape blocks
x ./backup.tar, 8734720 bytes, 17060 tape blocks
Tar: error! blocksize changed
# ll
total 20396
-rw-rw-rw- 1 root sys 18432 Feb 21 07:56 backup.tar
-rw-r----- 1 root sys 1689600 Dec 24 10:19 cvs-1.10.8-sd-11.00.depot
-rw-r----- 1 root sys 8734720 Dec 24 10:19 cvs-1.10.8-ss-11.00.tar
drwxr-xr-x 2 root root 96 Aug 13 2001 lost+found
# tar -tvf backup.tar
rwxr-xr-x 0/0 0 Feb 21 07:55 2002 ./
rwxr-xr-x 0/0 0 Aug 13 14:33 2001 ./lost+found/
rw-r----- 0/3 8734720 Dec 24 10:19 2001 ./cvs-1.10.8-ss-11.00.tar
Tar: error! blocksize changed
#
your backup.tar file is now toast (useless)
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:28 AM
02-21-2002 05:28 AM
Re: TAR problem
I did the same backup one directory above:
# tar -cvf backup.tar ./appl
a ./appl/cvs-1.10.8-ss-11.00.tar 17060 blocks
a ./appl/cvs-1.10.8-sd-11.00.depot 3300 blocks
# ls -l backup.tar
-rw-rw-rw- 1 root sys 10434560 Feb 21 08:06 backup.tar
#
Notice how large backup.tar is? That's because I wasn't backing up the file backup.tar. And because the size of backup.tar was increasing in your example, it clobbered your backup.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 05:32 AM
02-21-2002 05:32 AM
Re: TAR problem
Hopefully you have another backup on tape somewhere. You will be able to extract only the files listed by doing a :
tar -tvf backup.tar
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 06:01 PM
02-21-2002 06:01 PM
Re: TAR problem
The problem is you are telling tar to archive the current directory structure and your tarfile output is being written to the same directory. The first thing your tar command does is to open backup.tar for writing. Then tar begins walking the directory structure, adding all files it finds in the directory to backup.tar. All is well until tar comes to backup.tar. It begins reading and writing to the same file. Basically you have corrupted backup.tar. You will never be able to create a good archive like this.
I believe you have two choices for workarounds:
1. Specify backup.tar in another directory:
tar cvf /another_dir/backup.tar
2. Specify all files in the current directory instead of the current directory:
tar cvf backup.tar *
backup.tar must not exist before you use choice number 2 or you will have the same problem. Simply do rm backup.tar before using choice number 2.
* will not archive hidden files so you may want to specify them as well:
tar cvf backup.tar * .file
Choice number 1 is a much more simple approach unless you don't have hidden files.
You may wonder why * doesn't include backup.tar.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 06:25 AM
02-22-2002 06:25 AM
Re: TAR problem
Thanks all who helped me in this little doubt.
Regards,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 08:51 AM
02-22-2002 08:51 AM