How can I keep jobs/volumes beyond retention?

60 views
Skip to first unread message

Ariel Esteban Salvo

unread,
Jul 31, 2020, 3:18:03 PM7/31/20
to bareos-users
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?

Thanks!
   --Ariel

Spadajspadaj

unread,
Aug 1, 2020, 5:10:53 AM8/1/20
to bareos...@googlegroups.com
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

Ariel Esteban Salvo

unread,
Aug 1, 2020, 1:31:35 PM8/1/20
to bareos-users
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?

Spadajspadaj

unread,
Aug 1, 2020, 1:51:49 PM8/1/20
to bareos...@googlegroups.com

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.

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 bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/801d73cb-79fa-4071-b031-4d51b9089f02n%40googlegroups.com.

Ariel Esteban Salvo

unread,
Aug 4, 2020, 12:01:18 PM8/4/20
to bareos-users
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
Reply all
Reply to author
Forward
0 new messages