Flexbackup uses either the buffer or mbuffer program to help streaming tape drives from thrashing. The buffer program uses the -p command line option to specify the percentage the buffer to fill before writing data. Alas, mbuffer's command line is insidiously incompatible with buffer in this: it uses -P (capital P) instead of -p (lowercase p) to mean the same thing. In mbuffer -p (lowercase p) is for read buffer starvation control as opposed to write buffer fill control. Since flexbackup uses -p for both buffer and mbuffer, flexbackup causes a lot of tape drive thrashing when mbuffer is used, since the write buffer fill control is not specified. I've included a patch that corrects this issue. In addition, the "find" command line that is constructed to identify files to backup is awfully complex. In figuring out how to properly specify directories to prune, I made a small change to the program itself to log the pruning regex and added some informative comments to the "flexbackup.conf" file. The patch also applies both of these small changes. Finally, the patch corrects example global exclusions in the "flexbackup.conf" which actually break a backup under Gentoo because they exclude the backup of critical Portage components ("/usr/lib/portage/pym/cache", in fact). Probably not the best example for a Portage ebuild to install. The patches are against "flexbackup-1.2.1-r2". Note that there's a little bit of correction work on inconsistent indenting in there, too. I'm going to submit these patches upstream as well, but, upstream hasn't made any updates since 2003, so I really think the best way to get 'em into the tree is through a Gentoo bug. Reproducible: Always Steps to Reproduce: 1. Include "$buffer = 'mbuffer';" in "flexbackup.conf". 2. Backup to tape. Actual Results: Tape drive will thrash incessantly during backup: write a little bit, stop, backup, repeat. Expected Results: Reasonable buffering should keep tape drive moving in one direction most of the time.
Created attachment 113532 [details, diff] Patch to apply the described fixes.
Created attachment 115060 [details, diff] Update the documentation to describe the new features. Update the documentation (both man page and internal --help documentation) to describe the new features. Alas, I also made a small additional code change: I added a --no-symlink option as a complimentary option to the new --symlink one. This allows the option to be defaulted to on in genkernel.conf and then turned off from the command line.
Comment on attachment 115060 [details, diff] Update the documentation to describe the new features. Posted a patch for my genkernel enhancement to the wrong bug. Sorry for the trouble. Please ignore this patch.
Created attachment 116268 [details, diff] New patch applies against flexbackup-1.2.1-r3 without annoying offset messages.
This fix is in Portage now as flexbackup-1.2.1-r4 thanks to the help of the Gentoo Sunrise team.