DuplicacyLog captures the output and exit status of duplicacy
backup
,
copy
, prune
, check
, and restore
commands, logs a summary message
to the QNAP Notification Center, and optionally posts to
healthchecks.io.
Prerequisite: Duplicacy Web UI, QNAP packages for testing
Download QPKG for appropriate CPU type from the build
directory and install manually using the
QNAP App Center.
NOTE: This QPKG is not signed because qbuild --sign
requires
gpg2
, which QNAP does not provide.
Starting DuplicacyLog
replaces the duplicacy
CLI used by the Duplicacy
Web UI with the duplicacy-wrapper.py
script and links
/usr/bin/duplicacy
to the real CLI. Stopping DuplicacyLog
restores
the real CLI and /usr/bin/duplicacy
remains linked to the real CLI.
Commands are the same as the duplicacy
CLI, plus the following options
may be set in the -comment
global option:
Option | Description |
---|---|
log_at_start |
Log an Information message when starting duplicacy |
log_verbose |
Log individual WARN, ERROR, FATAL, and ASSERT messages |
healthchecks= url |
Send pings to healthchecks.io |
NOTE: Use of whitespace in the -comment
option currently causes an
error due to a Web UI bug.
Send notifications on all warnings and errors:
Send notifications on successful check
:
Send notifications when log_at_start
specified:
Send notifications on successful restore
:
Send DuplicacyLog
notifications:
NOTE: Filtering on more than one keyword currently does not work due to a QNAP Notification Center bug.
DuplicacyLog
starts a process (duplicacyln.sh
) that watches for changes
to the duplicacy
CLI installed by the Duplicacy Web UI and automatically
replaces it with a link to the wrapper script.
Modify shared/duplicacy-wrapper.py
to adapt DuplicacyLog to other
environments, for example, modify the log_tool()
function to send
email instead of running the QNAP log_tool
command.
See shared/duplicacyln.sh
for example bash
commands that replace
the duplicacy
CLI executable run by Duplicay Web with the wrapper
script.
(The wrapper is not a bash
script because bash
ignores the INT
signal,
which Duplicacy Web sends to abort the CLI.)