Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17779

Recover single file from MultiVolume Tar tape

$
0
0

Hello,

I've inherited the job of backing up data from our archive server to tape. This is kind of and advanced Linux4noobs question (I've cross posted on /Linux4noobs and /sysadmin too). I am a Windows sysadmin by day but Linux is a dark art to me.

We have CentOS 6.2 installed onto a Dell PC with a HP LTO4 tape drive connected via SCSI. I can successfully get large quantities of data to the tape drive by using the following command:

tar --one-file-system --tape-length=795G -cMvf /dev/st0 /mnt/files |tee /var/tmp/file_list.txt

This takes the files located at the /mnt directory and pushes them out to /dev/st0 which is our tape device, once it has written 795Gb, it requests another tape till it has taken all the data from that directory and the ones below it. The tee command is there to create a file log of what is on the tape.

Where I am struggling is being able to pull a single file back from the set of tapes. I have used the following command, resulting in no restored files but a message saying "You have new mail in /var/spool/mail/root" which I am not sure how to read.

The commands I have tried are: tar --multi-volume -xvf /dev/st0 "%full name of file as shown in file_list.txt%" -C %location to recover to%

and variations of this, such as putting in the exact path the file was backed up from, a /tmp and /home area to recover to. All this is being run as root so there shouldn't be any problems writing to an area.

Am I missing something obvious or going about this completely the wrong way? Can a single file even be extracted from a tar file on a tape?

submitted by infneon
[link][comment]

Viewing all articles
Browse latest Browse all 17779

Trending Articles