[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Restore files from tape using tar

Posted on 2004-10-01
3
Medium Priority
?
576 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
[X]
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
  • 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 750 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

656 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