BackupPC-users

Re: [BackupPC-users] More clarification- archiving straight to tape

2008-07-30 09:23:57
Subject: Re: [BackupPC-users] More clarification- archiving straight to tape
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: Joanne Cook <j.cook AT oxfordarch.co DOT uk>
Date: Wed, 30 Jul 2008 08:23:47 -0500
Joanne Cook wrote:
> Hi All,
> 
> Thanks for the help with understanding how archives work. I'm now trying to 
> stream them straight to tape, but having a few issues with it. If I set 
> $Conf{ArchiveComp} = 'gzip' then streaming straight to tape 
> ($Conf{ArchiveDest} = '/dev/nst0') fails with the following error:
> 
> Executing: /usr/share/backuppc/bin/BackupPC_archiveHost 
> /usr/share/backuppc/bin/BackupPC_tarCreate /usr/bin/split  serverlanc1 6 
> /bin/gzip .gz 0 /dev/nst0 5 *
> Xfer PIDs are now 8987
> Writing tar archive for host serverlanc1, backup #6 to /dev/nst0
> Done: 1093 files, 556537859 bytes, 29 dirs, 0 specials, 0 errors
> 
> gzip: stdout: Invalid argument
> Executing: /bin/sh -c -cf /usr/share/backuppc/bin/BackupPC_tarCreate -t -h 
> serverlanc1 -n 6 -s \* . | /bin/gzip >> /dev/nst0
> Error: /usr/share/backuppc/bin/BackupPC_tarCreate, compress or split failed
> Archive failed: Error: /usr/share/backuppc/bin/BackupPC_tarCreate, compress 
> or split failed
> 
> If I set $Conf{ArchiveComp} = 'none' then the job seems to succeed, but when 
> I try and see what's on the tape using "tar tvf /dev/nst0" I get the 
> following error:
> 
> tar: This does not look like a tar archive
> tar: Error exit delayed from previous errors
> 
> So- can I either fix it so that I can create gz files on the tape, or is the 
> second option actually giving me valid files, in which case how do I read 
> them?

Tape drives often have a 'block' size and reads and writes must match or 
be an exact multiple of this size.  Tar normally defaults to 10k blocks 
with padding inserted if needed, and when compressing will fork an extra 
process to properly block the output from gzip.  Linux usually defaults 
to 512 byte blocks.  The 'mt' program can show and set the tape block 
size.  If this is your problem, adding a 'dd' with the obs= option in 
the pipeline can control the block size of the writes.  Or, if you have 
enough temporary disk space, let the backuppc archive process dump to a 
file that you can write to tape with dd later.

-- 
   Les Mikesell
    lesmikesell AT gmail DOT com




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>