Re: [Bacula-users] I don't want to prune files !
…… Not working as expected




On Aug 18, 2011, at 11:46 AM, Hugo Letemplier wrote:

> 2011/8/18 Dan Langille <dan@xxxxxxxxxxxx>:
>>
>> On Aug 18, 2011, at 9:51 AM, Hugo Letemplier wrote:
>>
>>> 2011/8/18 Hugo Letemplier <hugo.let.35@xxxxxxxxx>:
>>>> 2011/8/16 Dan Langille <dan@xxxxxxxxxxxx>:
>>>>>
>>>>> On Aug 16, 2011, at 7:27 AM, Hugo Letemplier wrote:
>>>>>
>>>>>> 2011/8/16 Dan Langille <dan@xxxxxxxxxxxx>:
>>>>>>>
>>>>>>> On Aug 16, 2011, at 6:36 AM, Hugo Letemplier wrote:
>>>>>>>
>>>>>>>> 2011/8/16 Jeremy Maes <jma@xxxxxxxxxxxxxx>:
>>>>>>>>> Op 16/08/2011 11:45, Hugo Letemplier schreef:
>>>>>>>>>
>>>>>>>>> Hi the list !
>>>>>>>>>
>>>>>>>>> I have a recurrent issue in bacula.
>>>>>>>>>
>>>>>>>>> I specified a very long duration for job and file retention.
>>>>>>>>> I sepecified Purge File = No, Purge Job = No, Purge Volume = yes
>>>>>>>>> I have autoprune = yes in the pool description
>>>>>>>>>
>>>>>>>>> I work on a volume rotation basis, one volume is kept a time according
>>>>>>>>> to his pool's retention parameters.
>>>>>>>>>
>>>>>>>>> I want to keep in base, for some jobs, all the files that are in the
>>>>>>>>> volume because theses jobs are more usually used to restore some files
>>>>>>>>> than the whole job.
>>>>>>>>>
>>>>>>>>> But I still have "Puged Files = Yes" in the job run list in Bat.
>>>>>>>>>
>>>>>>>>> I don't understand what's happenning !
>>>>>>>>>
>>>>>>>>> Could you help me ?
>>>>>>>>>
>>>>>>>>> How can I check that my pruning directives work as expected ?
>>>>>>>>>
>>>>>>>>> Thank you in advance.
>>>>>>>>>
>>>>>>>>> Hugo
>>>>>>>>>
>>>>>>>>> Did you set these long retention times etc after you created the
>>>>>>>>> volumes?
>>>>>>>>> Those parameters are set for a volume when it's created, and are not
>>>>>>>>> automatically updated when you change the config and/or reload
>>>>>>>>> bacula. You
>>>>>>>>> have to issue the "update" command in bconsole and update your "pool
>>>>>>>>> from
>>>>>>>>> resource" for all pools and volume parameters "all volumes from
>>>>>>>>> pool". (or
>>>>>>>>> all volumes from all pools).
>>>>>>>>>
>>>>>>>>> Kind regards,
>>>>>>>>> Jeremy
>>>>>>>>>
>>>>>>>>> **** DISCLAIMER ****
>>>>>>>>> http://www.schaubroeck.be/maildisclaimer.htm
>>>>>>>>
>>>>>>>> Thanks for your answer
>>>>>>>>
>>>>>>>> Yes, I already have updated my volumes. So I dont understand very well
>>>>>>>> what 's happening
>>>>>>>
>>>>>>>
>>>>>>> When in doubt, ignore bat. Instead, look at what bconsole reports.
>>>>>>>
>>>>>>> --
>>>>>>> Dan Langille - http://langille.org
>>>>>>>
>>>>>>>
>>>>>> I checked via a restore
>>>>>> I think there is no doubt because bacula done an inc as big as a full
>>>>>> just after the jobs that were marked Pruned Files : yes
>>>>>> Also when i do a restore It says that there are missing files entries
>>>>>> and I cant select file and dirs with the tree in bconsole.
>>>>>>
>>>>>
>>>>> I believe you are reaching conclusions based on suspicions, not facts.
>>>>> The
>>>>> conclusions may be correct, but that doesn't help find the cause.
>>>>>
>>>>> Look at the output of 'list media'. Look at the value in volretention.
>>>>> It is in seconds.
>>>>>
>>>>> Is this value matching up with that expect?
>>>>>
>>>>>
>>>>> --
>>>>> Dan Langille - http://langille.org
>>>>>
>>>>>
>>>>
>>>> The Volume retention is correct. Moreover, the problem isn't on the
>>>> volume retention but on the file retention.
>>>>
>>>> My volumes are never pruned because for the moment I put it a little
>>>> too big duration, I keep an eye on the volume size and the remaining
>>>> space on the hard drive. I delete jobs then prune the volumes that
>>>> contains no jobs and purge action=Truncate manually on the purged
>>>> volumes ( I am at this point because bacula is pruning files and I
>>>> dont known the origin of the problem. So I do a lot of things manually
>>>> for safety reasons).
>>>
>>> In other words I set AutoPrune = No
>>>
>>>>
>>>> Where can I check this File retention, is it writen in the database
>>>> like for the volume retention, or only in the configuration file ?
>>>> What configuration directives should I check ?
>>
>> There are defaults for File retention (see below) so if you have not
>> specified, them, they are default.
>>
>> Look in the client table:
>>
>> bacula=# select clientid, name, autoprune, fileretention, jobretention from
>> client limit 3;
>> clientid | name | autoprune | fileretention | jobretention
>> ----------+----------+-----------+---------------+--------------
>> 21 | havoc-fd | 1 | 5184000 | 15552000
>> 12 | nz-fd | 1 | 2592000 | 15552000
>> 10 | ducky-fd | 1 | 5184000 | 15552000
>> (3 rows)
>>
>>
>> Retention is in seconds.
>>
>>>>
>>>> I updated all the file retention directives ( in client and pool ) to
>>>> a duration of 1 year.
>>>> So, now, it shouldn't purge files except if their jobs are deleted, if
>>>> job have its files purged or if the volume that contain the job is
>>>> purged, isn't it
>>
>>
>> No.
>>
>> Job, File, and Volume retention are all separate elements.
>>
>> I set my Job and File retention to a large value, say 30 years, then let
>> Volume
>> retention take care of pruning.
>
> this is what I wanted to say, volume pruning take precedence over the
> other directives

Umm, what do you mean by 'take precedence'? If any retention value is reached,
that particular item
is pruned. But if you lose a Volume to pruning, you lose files and jobs. And
if you loose
a job to pruning, you lose the files.


>
>>
>> From:
>> http://www.bacula.org/5.0.x-manuals/en/main/main/Catalog_Maintenance.html#SECTION004610000000000000000
>>
>> ###
>> File Retention = time-period-specification
>> The File Retention record defines the length of time that Bacula will keep
>> File records in the Catalog database. When this time period expires, and if
>> AutoPrune is set to yes, Bacula will prune (remove) File records that are
>> older than the specified File Retention period. The pruning will occur at
>> the end of a backup Job for the given Client. Note that the Client database
>> record contains a copy of the File and Job retention periods, but Bacula
>> uses the current values found in the Director's Client resource to do the
>> pruning.
>>
>> ...
>>
>> The default File retention period is 60 days.
>> ###
>>
>> --
>> Dan Langille - http://langille.org
>>
>>
>
> Here is the client list from the bacula database,
>
> bacula=> select clientid, name, autoprune, fileretention/(24*365*3600)
> AS FileRetentionInYears, fileretention, jobretention from client;
> clientid | name | autoprune | fileretentioninyears |
> fileretention | jobretention
> ----------+-----------------+-----------+----------------------+---------------+--------------
> 7 | ns1 | 1 | 1 |
> 31536000 | 31536000
>
> I will look at the logs to see when files where pruned maybe it will
> give me some help to solve this problem that make my backups totally
> instable.
> => As files where pruned, the next jobs are very large because it cant
> say if the file is in a previous backup.
>
>
> Thank you for your help
>
> Hugo

--
Dan Langille - http://langille.org


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Bacula-users mailing list
Bacula-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-users



Privacy