Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Require assistance using tar to restore to a different directory

Posted on 2004-10-29
Medium Priority
Last Modified: 2013-12-27
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?

Question by:ericdamphousse
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

ITcrow earned 500 total points
ID: 12443335
Pay a visit to:


Search in page for absolute / relative.
LVL 51

Expert Comment

ID: 12443426
cd to your destination directory, then use
  tar xf tarfile
then you should get a ./home
then do following:
  cd ..
 mv dir/home/ericd .

Author Comment

ID: 12443730

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 12443858
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

Expert Comment

ID: 12443870
You are welcome. I thought it will be worth-while not to spoon feed exact answer ;-)

Author Comment

ID: 12444029
That's fine by me :) thanks again

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question