Bacula-users

[Bacula-users] Success [was Re: Mistaken append of job to media]

2011-06-09 17:54:47
Subject: [Bacula-users] Success [was Re: Mistaken append of job to media]
From: Rory Campbell-Lange <rory AT campbell-lange DOT net>
To: Phil Stracchino <alaric AT metrocast DOT net>
Date: Thu, 9 Jun 2011 22:49:25 +0100
On 07/06/11, Rory Campbell-Lange (rory AT campbell-lange DOT net) wrote:
> On 07/06/11, Rory Campbell-Lange (rory AT campbell-lange DOT net) wrote:
> > On 07/06/11, Phil Stracchino (alaric AT metrocast DOT net) wrote:
> > > On 06/07/11 12:14, Rory Campbell-Lange wrote:

> > > > Does deleting the job remove the data (in this case the data for job
> > > > 329) off the tape? That is what I need to do.
> ...
> > > If it's really, really important to you that no trace of job 329 remain
> > > on that tape, then you need to migrate both job 315 AND job 329 to new
> > > media, then purge the old media, manually erase it from beginning to end
> > > with something like mt, and then relabel it.  But if it's really that
> > > important to you that no trace of data from one job ever remain on a
> > > tape used by another, then you need to be erasing and relabelling your
> > > tapes between EVERY use.[1]  I'm going to go out on a limb here and
> > > guess that you probably don't actually want or need to be doing that.
> 
> Actually, can't I retrieve the last file off job 315, forward a bit for
> safety, write WEOF, and then write garbage from there?

I'm writing to report success in wiping data from a second job appended
inadvertently to another job on the same tape.

I did the following:

1. found position of first file FF from second job using bacula
2. found position FF using mt
3. tested writing out data to disk to check FF point was correct
4. went back to position FF
5. wrote random data to tape from FF
6. verified that the last file from the first job was retrievable
7. verified that the first file on the second job was not retrievable

Procedure in some detail:
-------------------------

1.
    08-Jun 15:24 clwbackup-sd JobId 332: 3304 Issuing autochanger "load slot 
12, drive 0" command.
    08-Jun 15:25 clwbackup-sd JobId 332: 3305 Autochanger "load slot 12, drive 
0", status is OK.
    08-Jun 15:25 clwbackup-sd JobId 332: Ready to read from volume "CLW112L4" 
on device "LTO4-Drive1" (/dev/nst0).
    08-Jun 15:25 clwbackup-sd JobId 332: Forward spacing Volume "CLW112L4" to 
file:block 67:0.
    Therefore FF = 67

2. 
    mt -f /dev/nst0 rewind && mt -f /dev/nst0 fsf 67

3. 
    dd if=/dev/nst0 bs=64512 count=5000 > /tmp/filecheck
    (Bacula file headers are very useful here; filecheck shows the filename in 
the
    header of the raw dump)

4. 
    mt -f /dev/nst0 rewind && mt -f /dev/nst0 fsf 67

5. 
    dd if=/dev/urandom of=/dev/nst0 bs=64512
    or
    for II in $(seq 1 500); do openssl rand 1000000000 | dd of=/dev/nst0; done

6. 
    normal Bacula restore

7. 
    09-Jun 21:51 clwbackup-sd JobId 334: Ready to read from volume "CLW112L4" 
on device "LTO4-Drive1" (/dev.
    09-Jun 21:51 clwbackup-sd JobId 334: Forward spacing Volume "CLW112L4" to 
file:block 67:0.
    09-Jun 21:53 clwbackup-sd JobId 334: Error: block.c:275 Volume data error 
at 67:0! Wanted ID: "BB02", g? ,". Buffer discarded.
    *cancel


-- 
Rory Campbell-Lange
rory AT campbell-lange DOT net

Campbell-Lange Workshop
www.campbell-lange.net
0207 6311 555
3 Tottenham Street London W1T 2AF
Registered in England No. 04551928

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

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