Change default cache location for TKLBAM backups

Victor Vasev's picture

Hi, I have a couple of really large mysql dbs and my root partition runs out of space every time tklbam runs a backup. Can I change the location of the TKLBAM cache or is my only option to increase the partition size?

Jeremy Davis's picture

But from my reading of the TKLBAM docs (namely tklbam-backup) it seems that it is not a config option.

However it also appears that using 2 separate tklbam commands you can acheive your ends with:

tklbam-backup --dump=/tmp/mybackup
tklbam-backup --raw-upload=/tmp/mybackup

(source)
Where /tmp/mybackup is the directory where you wish to store your cached backup.

Out of interest I ran a TKLBAM simulation (tklbam-backup --simulate) to see if I could see what is going on. And it appears that tklbam-backup creates a directory called /TKLBAM and by default stores it's cache there. So I guess another option would be to mount --bind additional storage to /TKLBAM. I.e.:

mount --bind /mnt/tmp/TKLBAM /TKLBAM

(or similar...)

I haven't tested it though and I think ideally it would be great if the default tklbam-backup cache storage location could be configured! So I have made a feature request regarding that.

Victor Vasev's picture

because the script tries to create /TKLBAM and remove if it exists but with a bind the removal attempt yields an error. I created a manual bash script to run:

tklbam-backup --dump=/tmp/mybackup
tklbam-backup --raw-upload=/tmp/mybackup

and that seems to be working fairly well so will keep you posted if I come up with a better and cleaner solution.

 

Victor

Post new comment