Solved

Require assistance using tar to restore to a different directory

Posted on 2004-10-29
522 Views
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?

Thanks
Eric
0
Question by:ericdamphousse
    6 Comments
     
    LVL 5

    Accepted Solution

    by:
    Pay a visit to:
    http://www.gnu.org/software/tar/tar.html

    Manual:
    http://www.gnu.org/software/tar/manual/html_mono/tar.html

    Search in page for absolute / relative.
    0
     
    LVL 51

    Expert Comment

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

    Author Comment

    by:ericdamphousse
    Thanks...

    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

    eric
    0
     

    Author Comment

    by:ericdamphousse
    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
    0
     
    LVL 5

    Expert Comment

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

    Author Comment

    by:ericdamphousse
    That's fine by me :) thanks again
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    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…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    856 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now