cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with tar...

SOLVED
Go to solution
Allen Brand
Occasional Advisor

Problems with tar...

So I have large tarballs created of directories on an Alpha ES45 (OSF1 EvalES45.xxxxxx-xx.com V5.1 2650 alpha) -- five tarballs, smallest is ~14G, largest is ~40G. I created the tarballs with the following simple command:

# tar Ecvf / //

I then copied the data to another Alpha (OSF1 vega.xxxxxx-xx.com V5.1 2650 alpha) ES45, and attempted to untar the smallest tarball (~14G) to a SAN mount, eventually trying all switches where the command looked like this:

# tar EBLoixpvvf // .

However, nothing happens. I get this as output:

# tar EBLoixpvvf /san03/data05ALL /san03
blocksize = 256
#

This happens on both machines when I attempt to unarchive the tarball into a directory/sub-directory that is not it's original location. The tarball will extract fine (though it runs out of space) if I do not specify a target folder to unarchive to. As you can see, I have attempted to use every switch imaginable, but so far nothing has worked. Is there a syntax for forcing an archive to restore to subdirectories? What am I missing?
4 REPLIES
Allen Brand
Occasional Advisor

Re: Problems with tar...

Sorry for the duplicates, the forum messed me up. I'd delete if I could...admin, could you remove?
Ivan Ferreira
Honored Contributor
Solution

Re: Problems with tar...

Try using the "s" option to remove the initial "/". This will cause the tar file to be restored in the current directory, so run:

cd /path/to/san/mount
tar Expvf /path/to/tarfile.tar
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Allen Brand
Occasional Advisor

Re: Problems with tar...

Thank you very much, yes that worked fine. I had tried the 's' switch before, but had specified the folder to write to, so I suppose tar cannot use syntax like that. Very well...anyway, thank you very much.
Steven Schweda
Honored Contributor

Re: Problems with tar...

You might find it helpful not to use an
absolute path when creating the archive:

( cd / ; tar Ecvf / )

or

( cd / ; tar Ecvf )

(where "" could be some complex path)

This can greatly simplify restorations into
other locations.