Thanks for the info, MK. It helped.

Now... for posterity...

CAVEATS:

   - This might be a bit of overkill but it was a desperate measure for a 
   desperate time 
   - This will keep absolutely all jobs/volumes/files existing in those 
   pools the time it is run and any new ones that are run after (costs will 
   rise as there will be many many more backups retained for longer)
   - All affected jobs/volumes/files will be kept for, at least, the new 
   retention period or longer if not pruned.
   - I suppose this can be done for individual volumes but I needed to 
   affect too many (big jobs with a LOT of 2GB volumes)
   - I tested this only on my setup and in this particular situation: YMMV
   

This is what I did:

I changed all retention values (File, Job and Volume) in the affected pool 
configurations to n days (where appropriate/choose the value that works for 
you).
I disabled AutoPrune in the affected pool and client configurations.
With that done, I reloaded the config and issued the following commands in 
bconsole:

   - update -> Pool from resources
   - For each affected pool:
      - update -> Volume parameters -> All Volumes from Pool (I didn't try 
      "All Volumes from all Pools" as I read of an issue with empty pools but 
it 
      could work)
      
Once that is done:

   - the column "volretention" should be updated to "n*86400" seconds in 
   the pool and media tables 
   - the columns "fileretention" and "jobretention" should be updated in 
   the client table as well

Volumes/Jobs/Files that originally would have expired on Aug 2nd are still 
in my database and I was able to restore them today.

Eventually, I will revert the changes to their normal values with the exact 
same procedure and Bareos should prune those normally.

I hope this helps someone else down the line.

Regards!
    --Ariel
On Saturday, August 1, 2020 at 2:51:49 PM UTC-3 [email protected] wrote:

> Damn, my bad. I looked hastily into update and was pretty sure it worked 
> for jobs the same way it does for volumes.
>
> Apparently it does not. So you'd have to set retention period on whole 
> volumes (here I'm pretty sure you can do that; I did it myself ;->).
>
> Sorry for the confusion.
> On 01.08.2020 19:31, Ariel Esteban Salvo wrote:
>
> Thanks!
>
> I'm looking into "update" to do it but I only seem to be able to change 
> volretention of volumes.
> Will that keep my job records as well?
> What about file records?
>
> On Saturday, August 1, 2020 at 6:10:53 AM UTC-3 [email protected] wrote:
>
>>
>> On 31.07.2020 21:18, Ariel Esteban Salvo wrote: 
>> > Hi! 
>> > 
>> > One of our clients was hit by a ransomware attack, Bareos did its job 
>> > and we were able to rebuild most of what was lost. 
>> > 
>> > I'd like to keep the jobs I used to restore for a while longer (just 
>> > in case) 
>> > What are my options? 
>> > 
>> > I've seen migration and copy jobs in the docs but I've never used them. 
>> > Are there any other options? 
>>
>>
>> You can use update command to change job parameters. 
>>
>> If you update job's retention period it won't get pruned earlier. 
>>
>>
>> Best regards, 
>>
>> MK 
>>
>>
> The information contained in this e-mail may be confidential. It has been 
> sent for the sole use of the intended recipient(s). If the reader of this 
> message is not an intended recipient, you are hereby notified that any 
> unauthorized review, use, disclosure, dissemination, distribution or 
> copying of this communication, or any of its contents, 
> is strictly prohibited. If you have received it by mistake please let us 
> know by e-mail immediately and delete it from your system. Many thanks.
>
>  
>
> La información contenida en este mensaje puede ser confidencial. Ha sido 
> enviada para el uso exclusivo del destinatario(s) previsto. Si el lector de 
> este mensaje no fuera el destinatario previsto, por el presente queda Ud. 
> notificado que cualquier lectura, uso, publicación, diseminación, 
> distribución o copiado de esta comunicación o su contenido está 
> estrictamente prohibido. En caso de que Ud. hubiera recibido este mensaje 
> por error le agradeceremos notificarnos por e-mail inmediatamente y 
> eliminarlo de su sistema. Muchas gracias.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bareos-users/801d73cb-79fa-4071-b031-4d51b9089f02n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bareos-users/801d73cb-79fa-4071-b031-4d51b9089f02n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
-- 


The information contained in this e-mail may be confidential. It has been 
sent for the sole use of the intended recipient(s). If the reader of this 
message is not an intended recipient, you are hereby notified that any 
unauthorized review, use, disclosure, dissemination, distribution or 
copying of this communication, or any of its contents, is strictly 
prohibited. If you have received it by mistake please let us know by e-mail 
immediately and delete it from your system. Many thanks.

 

La información 
contenida en este mensaje puede ser confidencial. Ha sido enviada para el 
uso exclusivo del destinatario(s) previsto. Si el lector de este mensaje no 
fuera el destinatario previsto, por el presente queda Ud. notificado que 
cualquier lectura, uso, publicación, diseminación, distribución o copiado 
de esta comunicación o su contenido está estrictamente prohibido. En caso 
de que Ud. hubiera recibido este mensaje por error le agradeceremos 
notificarnos por e-mail inmediatamente y eliminarlo de su sistema. Muchas 
gracias.

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/d05d6402-d325-4a93-b5e9-2d12e38d7918n%40googlegroups.com.

Reply via email to