Require assistance using tar to restore to a different directory

morning all,

I just updated from Solaris 9 to Solaris 10 (build 63). Previous to that, I did a backup of my users directories (well, only one, me) using tar. What I have done was 'tar cvf /dev/rmt/0 /home/ericd'.  On installing Solaris 10, I set up my user directories under /export/home, for example, /export/home/ericd. On Solaris 9, this was simply /home, i.e. /home/ericd.
The problem I currently have is that the restore will not work. The error message is as follows ===> tar: /home/ericd: Operation not applicable tar: cannot open /home/ericd/.java/blabla.

The closest thing I found was using the -C as such: tar xvf /dev/rmt/0 -C /export/home/ericd, but that aint working, it just sits there, looking dumb (or is that me sitting there, mmmm)

Any ideas?

Who is Participating?
Pay a visit to:


Search in page for absolute / relative.
cd to your destination directory, then use
  tar xf tarfile
then you should get a ./home
then do following:
  cd ..
 mv dir/home/ericd .
ericdamphousseAuthor Commented:

I am looking through the gnu tar to figure how I can achieve this.
I tried your example ahoffman, but I get the same error as I did previously. Seems the problem is simply that I have archived using an absolute path and now need to restore to a diff path. I know for a fact that I have used to Sun tar when I initially did this

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

ericdamphousseAuthor Commented:
got it....

here is how it goes, using the GNU Tar:
/usr/local/bin/tar xvf /dev/rmt/0 -C /export

This will reconstruct my home/ericd under export, i.e. /export/home/ericd, just the way I wanted.

Thanks guys
You are welcome. I thought it will be worth-while not to spoon feed exact answer ;-)
ericdamphousseAuthor Commented:
That's fine by me :) thanks again
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.