How do I create a persistent systemd-journald namespace?
I have a backup service that is run by a systemd timer. I would like that to use it's own namespace. I can create the namespace manually using systemctl start [email protected]. However I cannot find a way to do that successfully at boot time. I have tried a RequiredBy and a Requires in the timer unit but neither seem to work.
Here are the relevant unit files. /etc/systemd/[email protected]/backup-and-csv.conf [Journal] SystemMaxUse=1G SystemKeepFree=5G MaxRetentionSec=1day MaxFileSec=1week /etc/systemd/system/backup-and-csv.service [Unit] Description=InfluxDB incremental backup and csv service [Service] Type=oneshot User=pi WorkingDirectory=~ ExecStart=/home/pi/bin/backup-and-csv /etc/systemd/system/backup-and-csv.timer [Unit] Description=backup-and-csv timer [email protected] [email protected] [Timer] OnBootSec=8min OnUnitActiveSec=10min [Install] WantedBy=timers.target #[email protected] Any ideas?
