Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-17-2004, 07:43 AM   #1
Registered: Feb 2004
Location: Leicester, UK
Distribution: suse 9 pro
Posts: 34

Rep: Reputation: 15
Help restoring from tape and tar......

Hi Folks,

Every night I backup a whole load of files to an external tape drive. It took me a while but I came up with this which seems to work:

tar -cvz -b 16384 -X /tmp/excludefile -f /dev/nst0 /var/backup/ > /var/log/backup/tapebackup/backup-`date +%Y%m%d`.log 2>/var/log/backup/tapebackup/backup-`date +%Y%m%d`.log

Anyways, its been about 2 weeks since I've done this and I want to run a test restore.

So I rewind the tape.

And then for example: (a file picked at random)

tar -tv -b 16384 -f /dev/nst0 /var/backup/edwtserv16/arcdata/EPOSD11/import/enable_consts.sql

I know this file exists because I got it from the logs.

Then it returns this for about 20 minutes whilst the tape whirls around in use:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers

Then I get this:
tar: /var/backup/edwtserv16/arcdata/EPOSD11/import/enable_consts.sql: Not found in archive
tar: Error exit delayed from previous errors

So am I doing something stupid? I dont like the "This does not look like a tar archive" Why is it saying that when it is being created as a tar archive?

Any ideas?


Old 02-17-2004, 08:42 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Your logs method look pretty enough but I don't see anything that looks like a name for the actual tar file.

Here's my example. I'm using the current date as the filename with an extension of tar.gz. Now that is going to another hard drive so I gunzip it ( gz ) but since you are saving to a tape, you shouldn't need the gz.

filename=`date '+%m%d%y'`
tar -cvzf /mnt/backup/${filename}.tar.gz /home
#Delete old files with the following command
find /mnt/backup -type f -name '*.gz' -mtime +90 -exec rm {} \;


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Restoring data from tape backups enygma Linux - General 8 11-11-2004 02:29 PM
Problem with dd and tar to tape hastur Linux - Software 0 10-22-2004 08:38 AM
Using the Multiple tape option with TAR bassman Programming 0 07-08-2004 01:49 PM
HELP, corrupted tar tape Paul_assheton Linux - General 1 01-20-2004 11:37 AM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 08:04 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration