Solved

Restore files from tape using tar

Posted on 2004-10-01
3
566 Views
Last Modified: 2013-12-16
Hi all,
  I am stuck with something that should realistically be straight forward.
I have a tape archive containing a file that has been backed up.  The file is on the tape if I do "tar tvf /dev/st0 > /tmp/tape_contents" and search the file /tmp/tape_contents I can see the file name.

The file I want to restore is shown in /tmp/tape_contents as "home/data1/Advertising Material/Marks Stuff/1] Documents/brochure 2004/BROCHURE"

How can I restore the file ?
I have tried the following:
tar -xf /dev/st0 "home/data1/Advertising Material/Marks Stuff/1] Documents/brochure 2004/BROCHURE"
And:
tar -xf /dev/st0 home/data1/Advertising Material/Marks Stuff/1] Documents/brochure 2004/BROCHURE

Neither restore the file.... my problems are down to the spaces in file names I believe (the files were created using a Samba share).
Time is running out now - I need to get this file back urgently.  Can anyone give me the correct command to restore the file shown above ?
0
Comment
Question by:ricurtis
  • 2
3 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12202749
It might be that "1]  " is simply the ASCII representation of some binary string in the directory name. What I'd do is to restore the "home/data1/Advertising Material/Marks Stuff" directory and pick the file out of that.
0
 

Author Comment

by:ricurtis
ID: 12202965
Just before I do this, is the correct command :
tar -xf /dev/st0 home/marketing/Advertising\ Material/Marks\ Stuff/* /tmp/restore/

to restore it into a different directory ?  I dont want to risk overwriting anything that has changed since this backup took place ?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 12203197
Nope, use:

mkdir /tmp/restore
cd /tmp/restore
tar xvf /dev/st0 home/marketing/Advertising\ Material/Marks\ Stuff

That will extract the specified directory into /tmp/restore.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

20 Experts available now in Live!

Get 1:1 Help Now