Missing log lines in journalctl output


#1

Hi all,

I have configured duplicacy as systemd service to have recurring backups. I think all is good expect I think I am missing log lines from journalctl logs.

For example, after running the service, I have the following:

systemctl status duplicacy_backup.service 
● duplicacy_backup.service - Duplicacy backup
   Loaded: loaded (/etc/systemd/system/duplicacy_backup.service; static; vendor pres>
   Active: inactive (dead) since Thu 2019-03-21 20:56:46 EET; 2min 18s ago
  Process: 27684 ExecStart=/usr/local/bin/duplicacy -v -debug -log backup -stats (code=exited, status=0/SUCCESS)
 Main PID: 27684 (code=exited, status=0/SUCCESS)

REDACTED
Mar 21 20:56:24 mypc duplicacy[27684]: 2019-03-21 20:56:24.653 DEBUG PATTERN_INCLUDE home/REDACTED
Mar 21 20:56:24 mypc duplicacy[27684]: 2019-03-21 20:56:24.653 DEBUG LIST_ENTRIES Listing home/REDACTED

So the process exited successfully (exit code 0), but the output is missing -stats summary as I would have expected.

Backup seems to be successful since duplicacy list returns the same timestamp

Storage set to sftp://REDACTED
REDACTED
Snapshot REDACTED revision 12 created at 2019-03-21 20:53 
Snapshot REDACTED revision 13 created at 2019-03-21 20:56 

When I run the exact same command /usr/local/bin/duplicacy -v -debug -log backup -stats in terminal, I get the full output, ending with

2019-03-21 21:09:50.561 INFO BACKUP_STATS File chunks: 13683 total, 69,548M bytes; 6 new, 42,471K bytes, 6,612K bytes uploaded
2019-03-21 21:09:50.561 INFO BACKUP_STATS Metadata chunks: 39 total, 182,447K bytes; 6 new, 24,360K bytes, 6,553K bytes uploaded
2019-03-21 21:09:50.561 INFO BACKUP_STATS All chunks: 13722 total, 69,726M bytes; 12 new, 66,832K bytes, 13,166K bytes uploaded
2019-03-21 21:09:50.561 INFO BACKUP_STATS Total running time: 00:00:36
2019-03-21 21:09:50.561 WARN BACKUP_SKIPPED 8 files were not included due to access errors

Why the log output seems to be different when running in systemd? Is there some sort of log buffering happening in the program?


The .service is as follows

$ cat /etc/systemd/system/duplicacy_backup.service 

[Unit]
Description=Duplicacy backup

[Service]
Type=simple
ExecStart=/usr/local/bin/duplicacy -v -debug -log backup -stats
WorkingDirectory=/usr/local/etc/duplicacy 
TimeoutSec=infinity

#2

These are some systemd magics… not sure what else to say.

I am using duplicacy with systemd in Duplicacy-Utils, but i’m just calling my powershell script from systemd, and that script is doing all work of setting up and calling duplicacy.