There are persistent questions why output from options like --list
and --stats doesn't show up. Also, borg currently isn't able to
show *just* the output for a given option (--list, --stats,
--show-rc, --show-version, or --progress), without other INFO level
messages.
The solution is to use more granular loggers, so that messages
specific to a given option goes to a logger designated for that
option. That option-specific logger can then be configured
separately from the regular loggers.
Those option-specific loggers can also be used as a hook in a
BORG_LOGGING_CONF config file to log the --list output to a separate
file, or send --stats output to a network socket where some daemon
could analyze it.
Steps:
- create an option-specific logger for each of the implied output options
- modify the messages specific to each option to go to the correct logger
- if an implied output option is passed, change the option-specific
logger (only) to log at INFO level
- test that root logger messages don't come through option-specific loggers
They shouldn't, per https://docs.python.org/3/howto/logging.html#logging-flow
but test just the same. Particularly test a message that can come from
remote repositories.
Fixes#526, #573, #665, #824
Parser now understands both old format messages (to keep talking to
old server) and new format messages that pass a logger name. If
logger name is passed, the message is directed to the same logger
locally.
This could be cherry-picked to 1.x-maint (and 0.x-maint?) to allow
point releases to understand borg 1.1 server messages changed in the
next commit. Worst case, currently existing 0.x and 1.0.x clients
talking to a 1.1.x server will see messages like:
borg.repository Remote: hi
borg.archiver Remote: foo
instead of
Remote: hi
Remote: foo
- Instead of very small (5 MB-ish) segment files, use larger ones
- Request asynchronous write-out or write-through (TODO) where it is supported,
to achieve a continuously high throughput for writes
- Instead of depending on ordered writes (write data, commit tag, sync)
for consistency, do a double-sync commit as more serious RDBMS also do
i.e. write data, sync, write commit tag, sync
Since commits are very expensive in Borg at the moment this makes no
difference performance-wise.
New platform APIs: SyncFile, sync_dir
[x] Naive implementation (equivalent to what Borg did before)
[x] Linux implementation
[ ] Windows implementation
[-] OSX implementation (F_FULLSYNC)
was forgotten there and not used any more since a while.
also removed the hint about PyCrypto being an alternative to crypto.pyx,
it was not updated since 2014, looks pretty stale.
Add /opt/pkg (used by pkgsrc on Mac OS X) to possible openssl and
lz4 header path.
from 2015Q2 onwards the prefix has changed to /opt/pkg
in order to be compatible with El Capitan's
"System Integrity Protection" feature.
-- pkgsrc.joynet.com
thanks to @weakish for finding this!