Kern Sibbald schrieb:
> > Of course! If it's a bug I would like to help fix it. If it's a
> > missconfiguration, I would like to find the error.
> 
> The way I would proceed if I had the time to work on this would be to setup 
> a "dummy" backup, either on a separate machine, or with a different Job name 
> on your production machine.  I would then write a volume, then recycle it 
> (purge, ...), and at each step do a "llist volume=xxx" and see what happens.  
> You could even set a pretty short volume use duration and see what happens 
> when 1. that use duration is normally exceeded, and 2. what happens just 
> after a recycle and the use duration is exceeded from the previous 
> firstwritten.
> 
> That would show the evolution of the volume, and might reproduce the "bug".

I did set up a test job with these settings:

Pool {
  Name = Test
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Recycle Oldest Volume = yes
  Volume Use Duration = 5 minutes
  Volume Retention = 30 minutes
}

Client {
  Name = VU0EM005-Test
  Address = 10.60.1.250
  FDPort = 9102
  Catalog = MyCatalog
  Password = "snip"
  File Retention = 30 minutes
  Job Retention = 60 minutes
  AutoPrune = yes
}

Job {
  Name = "VU0EM005-Test-1"
  Type = Backup
  Client = VU0EM005-Test
  FileSet = "VU0EM005-Test"
 Schedule = "Test"
  Storage = NEC-T40A
  Messages = Standard
  Pool = Test
  SpoolData=yes
  Priority = 5
}

Job {
  Name = "VU0EM005-Test-2"
  Type = Backup
  Client = VU0EM005-Test
  FileSet = "VU0EM005-Test"
 Schedule = "Test"
  Storage = NEC-T40A
  Messages = Standard
  Pool = Test
  SpoolData=yes
  Priority = 10
}

Schedule {
  Name = "Test"
  Run = Level=Full hourly at 0:05
  Run = Level=Full hourly at 0:20
  Run = Level=Full hourly at 0:35
  Run = Level=Full hourly at 0:50
}


the backup starts:


12-Apr 13:05 VU0EM005: Start Backup JobId 132, 
Job=VU0EM005-Test-1.2007-04-12_13.05.00
12-Apr 13:05 VU0EM005: 3307 Issuing autochanger "unload slot 19, drive 0" 
command.
12-Apr 13:06 VU0EM005: 3304 Issuing autochanger "load slot 20, drive 0" command.
12-Apr 13:06 VU0EM005: 3305 Autochanger "load slot 20, drive 0", status is OK.
12-Apr 13:06 VU0EM005: 3301 Issuing autochanger "loaded? drive 0" command.
12-Apr 13:06 VU0EM005: 3302 Autochanger "loaded? drive 0", result is Slot 20.
12-Apr 13:06 VU0EM005: Wrote label to prelabeled Volume "06D139L3" on device 
"LTO3" (/dev/nst0)
12-Apr 13:06 VU0EM005: Spooling data ...
12-Apr 13:07 VU0EM005: Job write elapsed time = 00:00:40, Transfer rate = 38.75 
M bytes/second
12-Apr 13:07 VU0EM005: Committing spooled data to Volume "06D139L3". Despooling 
1,551,808,127 bytes ...

[snip]
12-Apr 13:10 VU0EM005: Max configured use duration exceeded. Marking Volume 
"06D139L3" as Used.

at 13:25

*llist volume=06D139L3
          mediaid: 21
       volumename: 06D139L3
             slot: 20
           poolid: 10
        mediatype: LTO3
     firstwritten: 2007-04-12 13:05:03
      lastwritten: 2007-04-12 13:08:25
        labeldate: 2007-04-12 13:05:03
          voljobs: 2
         volfiles: 4
        volblocks: 48,102
        volmounts: 1
         volbytes: 3,103,220,736
        volerrors: 0
        volwrites: 48,103
 volcapacitybytes: 0
        volstatus: Used
          enabled: 1
          recycle: 1
     volretention: 1,800
   voluseduration: 300
       maxvoljobs: 0
      maxvolfiles: 0
      maxvolbytes: 0
        inchanger: 1
          endfile: 3
         endblock: 8,550
         volparts: 0
        labeltype: 0
        storageid: 2
         deviceid: 0
       locationid: 0
     recyclecount: 0
     initialwrite: 
    scratchpoolid: 0
    recyclepoolid: 0
          comment: 

[snip]    
12-Apr 13:41 VU0EM005: Pruned 2 Jobs on Volume "06D139L3" from catalog.
12-Apr 13:41 VU0EM005: Recycled volume "06D139L3"

at 13:42

*llist volume=06D139L3
          mediaid: 21
       volumename: 06D139L3
             slot: 20
           poolid: 10
        mediatype: LTO3
     firstwritten: 1970-01-01 01:00:00
      lastwritten: 2007-04-12 13:08:25
        labeldate: 2007-04-12 13:05:03
          voljobs: 0
         volfiles: 0
        volblocks: 0
        volmounts: 1
         volbytes: 1
        volerrors: 0
        volwrites: 48,103
 volcapacitybytes: 0
        volstatus: Recycle
          enabled: 1
          recycle: 1
     volretention: 1,800
   voluseduration: 300
       maxvoljobs: 0
      maxvolfiles: 0
      maxvolbytes: 0
        inchanger: 1
          endfile: 3
         endblock: 8,550
         volparts: 0
        labeltype: 0
        storageid: 2
         deviceid: 0
       locationid: 0
     recyclecount: 1
     initialwrite: 
    scratchpoolid: 0
    recyclepoolid: 0
          comment: 



This looks ok to me.



I've no idea why none of the volumes in the incr/diff pools were pured until
now, there is at least no message about it in the log. 

So I manually started a differential backup.


12-Apr 14:23 VU0EM005: Start Backup JobId 138, Job=VU0EM003.2007-04-12_14.23.42
12-Apr 14:23 VU0EM005: Pruned 3 Jobs on Volume "06D125L3" from catalog.
12-Apr 14:23 VU0EM005: ua_purge.c:611 All records pruned from Volume 
"06D125L3"; marking it "Purged"
12-Apr 14:23 VU0EM005: Recycled volume "06D125L3"

Now the expected volume 06D125L3 was marked as purged...

For completeness, the relevant parts of my config.

Job {
  Name = "VU0EM003"
  Type = Backup
  Client = VU0EM003
  FileSet = "VU0EM003 Full"
  Schedule = "Regular Backup"
  Storage = NEC-T40A
  Messages = "Regular Backup"
  Pool = Default
  SpoolData=yes
  Write Bootstrap = "/opt/bacula/var/bacula/working/VU0EM003.bsr"
  Priority = 10 
}

Job {
  Name = "SMTCZB0003"
  Type = Backup
  Client = SMTCZB0003
  FileSet = "SMTCZB0003"
  Schedule = "Regular Backup"
  Storage = NEC-T40A
  Messages = "Regular Backup"
  Pool = Default
  SpoolData=yes
  Write Bootstrap = "/opt/bacula/var/bacula/working/SMTCZB0003.bsr"
  Priority = 5
  RunBeforeJob = "snip"
  RunAfterJob = "snip"
}

Schedule {
  Name = "Regular Backup"
  Run = Level=Full Pool=Full 1st sun at 00:05
  Run = Level=Differential Pool=Differential FullPool=Full 2nd-5th sun at 00:05
  Run = Level=Incremental Pool=Incremental DifferentialPool=Differential 
FullPool=Full tue-sat at 00:05
}

Client {
  Name = VU0EM003
  Address = 10.60.1.252
  FDPort = 9102
  Catalog = MyCatalog
  Password = "snip"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = SMTCZB0003
  Address = [snip]
  FDPort = 9102
  Catalog = MyCatalog
  Password = "snip"
  File Retention = 30 days
  Job Retention = 6 months
  AutoPrune = yes
}

Pool {
  Name = Full
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Recycle Oldest Volume = yes
  Volume Use Duration = 96 hours
  Volume Retention = 180 days
}

Pool {
  Name = Differential
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Recycle Oldest Volume = yes
  Volume Use Duration = 96 hours
  Volume Retention = 31 days
}

Pool {
  Name = Incremental
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Recycle Oldest Volume = yes
  Volume Use Duration = 20 days
  Volume Retention = 26 days 
}

Pool {
  Name = Scratch
  Pool Type = Backup
}




At the moment I can't reproduce the problem, I'll have to wait till it happens 
again.

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to