SOURCE path modules - update and questions

robb robb at
Sun Aug 12 17:11:05 UTC 2007

OK, I have the core source type working. But it took some changes to the
core. Do any of these sound like a problem to anyone:

- Migrated gpg file name check from foreach_file to Brackup::Backup and
made it specific to gpg. It should trigger on dry runs if gpg is active.
It seems to be a better location for it and shouldn't slow anything down.
-- WARNING: it may also be needed in Brackup::Root in the du_stats()
function. That function is not currently used so I am not sure of the
proper way to handle the gpg file checking there.

- Migrated the default foreach_file processing from Brackup::Root to to form the base for inheritance. No functional
changes to the algorithm.

- Added TYPE handling to the configuration processing, the default is to
use the original algorithm.

?? I spent a lot of time keeping the performance high while factoring
file selection code. The goal being to reduce kernel times to make life
easier on VPS (such as VZ based hosts). In retrospect I am not sure it
was always worth it. For example the GPG check could be a function, but
that reduces performance by an additional 4-5%.

?? The calls to foreach_file() use callbacks. That's nice but does have
a speed impact. It might be good to try returning a array reference from
from foreach_file and letting callers process and use that. That would
allow for post-processing of the array via inheritance placing GPG and
other future internal ignores there.

New modules pending testing today:

Target::SFTP - Backup via SSH

Source::DEFAULT - An alias to and handles the default
(historical) file selection logic

Source::SimpleFind - A new module which returns results almost exactly
like Source:DEFAULT. The selection difference difference is that it
properly skips the digcache in all cases. This module forms a slid base
for additional modules to build on by providing pre/pos and is-wanted
overloads. If the overloads are not used selection logic is only 3-4%
slower (often less) than DEFAULT. Optionally does duplicate scanning on
file names.

Source::FileList - A very simple selection logic that reads entries from
a file, STDIN or allows for standard Perl piping (find /home/robb -name
'*.pm' |). It does duplicate scanning.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url :

More information about the brackup mailing list