Bacula-users

Re: [Bacula-users] Difficulties with tape rotation/recycling

2008-04-09 14:40:50
Subject: Re: [Bacula-users] Difficulties with tape rotation/recycling
From: Ryan Novosielski <novosirj AT umdnj DOT edu>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 09 Apr 2008 12:44:30 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wil Cooley wrote:
> I am running 2.0.3 on Fedora 8 for my director, which also provides SD 
> for my tape drive. I am having troubles understanding tape 
> rotation/recycling, I guess, even though I have read the section 
> "Automatic Volume Recycling" in the manual a dozen times or more.

Part of the problem is it sort of sounds like you may not have read any
of the rest of the manual, which contains a lot on operational tasks.
Read on some.

> My goal is to use two tapes, swapping them every two weeks and 
> overwriting them when I do. I have 10GB tapes (w/o hardware compression) 
>   and backup about 4GB per week. So far so good. The trouble comes when 
> I need to exchange the tape. It's difficult to describe the exact 
> scenarios when it will not work; there is so much time between each 
> session when I try to understand it that I forget things and end up 
> nearly starting over each time. I have been through a number of 
> iterations, but my current configuration is below. Often it will just 
> wait for days with the correct (by my expectations) tape mounted, but 
> jobs will not run. "status storage=mytape" shows that it seems to be 
> unhappy with the current tape for whatever reason.

You need to find out why not. "Whatever reason" is absolutely something
that needs to be known before you can figure this out, and I don't think
anyone on the list will be able to tell you. It helps to draw this out
on a piece of paper. Bacula will save the volume for the retention
period. Everything you should need to figure out how long that is can be
gotten from 'llist media=<name>'. Figure out when a tape is due to
expire. The time values are written in seconds.

> I have found previously that once I got the tape to "Recycled" or 
> "Purged" state (sometimes by manually pruning/purging), Bacula would use 
> the tape if I restarted the director (or maybe restarted the storage?). 
> Damn, I just restarted them both to check and now there are no jobs 
> waiting on the tape and the tape is no longer in state "BLOCKED waiting 
> for mumblemumble". I guess I'll so if they run tonight.

No, this is wrong -- you never restart the daemon to deal with tape
manipulations. Have you read the tutorial section of the manual? A mount
is all you need.

> At any rate, here are the important bits of my configuration; perhaps 
> someone can tell me if I am doing something boneheaded.
> 
> My clients are all basically the same as this, with the exception of 
> name, address and password:
> 
> Client {
>    Name      = myhost
>    Address   =  myhost
>    FDPort    = 9102
>    Catalog   = MyCatalog
>    Password  = "xxx"
>    File Retention = 14 days
>    Job Retention = 14 days
>    AutoPrune = yes
> }
> 
> Pool sets my volume size, count, retention period and use duration. Hm, 
> is "Recycle Current Volume = yes" what I am missing? Or would "Recycle 
> Oldest Volume" be better, so pruning doesn't happen on the tape that 
> needs to be swapped out if it takes me a few days to do it (which it 
> does sometimes)?

- From what you said above, it sounds like you've done the required
reading here, but do not necessarily have a good grasp of how this
works. I'm not sure what's in that chapter, as I haven't read it myself
lately.

What you need to document is how exactly you're getting to this point.
It's not clear what you intended to do with that label format directive.
As you only have 2 volumes, it looks like it will never be used. You
have not shown us your volumes though, so I couldn't tell you.

The key principle to automatic recycling is that you will have a finite
number of volumes (which here, you do), a finite limit of how long/much
they will be used, and retention periods that are not longer than the
amount of time it will take to need another volume.

FYI, however, I found 2 volumes was very problematic. I can't be more
specific, but I found out there was always difficulty with my retention
periods unless I had that third volume as a buffer.

> Pool {
>    Name          = Default
>    Pool Type     = Backup
>    Recycle       = yes
>    AutoPrune     = yes
>    Maximum Volume Bytes = 10 gb
>    Maximum Volumes = 2
>    Volume Retention = 14 days
>    Volume Use Duration =  14 days
>    LabelFormat   = "TR5-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}"
> }
> 
> Jobs and JobDefs; nothing too special here:
> 
> JobDefs {
>    Name              = "DefaultJob"
>    Type              = Backup
>    Level             = Incremental
>    Schedule          = "WeeklyCycle"
>    Storage           = mytape
>    Messages          = Standard
>    Pool              = Default
>    Priority          = 10
>    SpoolData         = yes
> }
> 
> Job {
>    Name              = "myhost-selective"
>    JobDefs           = "DefaultJob"
>    FileSet           = "myhost Selective Set"
>    Client            = myhost-fd
>    Write Bootstrap   = "/var/spool/bacula/myhost.bsr"
>    RunBeforeJob      = "/etc/backup.d/backup"
> }
> 
> 
> Thanks for taking the time to read through this!


- --
 ---- _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$&| |__| |  | |__/ | \| _| |novosirj AT umdnj DOT edu - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH/PJumb+gadEcsb4RAj3FAJ41PmYwTpK4DUhbsnk9A2oSsRd6NQCgtQm+
82GhBY03KPI0IE9nLeNoI8c=
=zjHP
-----END PGP SIGNATURE-----

Attachment: novosirj.vcf
Description: Vcard

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users