I use a systemd timer to start an associated service; simply a rsync backup of certain (e.g.
/home) directories. A copy of the timer content is below, and the file is located in the
/usr/local/lib/systemd/system/ directory. FYI, the rsync systemd unit and script are both tested and work well.
# cat /usr/local/lib/systemd/system/rsync-backup.timer [Unit] Description=Run backup via rsync script each morning. [Timer] OnCalendar=*-*-* 3:00:00 [Install] WantedBy=timers.target
My problem is that the above timer shows the following status after each boot, the key part being
● rsync-backup.timer - Run backup via rsync script each morning. Loaded: loaded (/usr/local/lib/systemd/system/rsync-backup.timer; enabled; vendor preset: disabled) Active: inactive (dead) Trigger: n/a Triggers: ● rsync-backup.service
I can simply solve this by entering the following command and everything comes up as expected. So long as I do not restart before the next backup, the backup runs at the expected time and goes smoothly.
# systemctl enable --now rsync-backup.timer # systemctl status rsync-backup.timer ● rsync-backup.timer - Run backup via rsync script each morning. Loaded: loaded (/usr/local/lib/systemd/system/rsync-backup.timer; enabled; vendor preset: disabled) Active: active (waiting) since Sat 2021-01-30 22:19:15 EST; 3s ago Trigger: Sun 2021-01-31 03:00:00 EST; 4h 40min left Triggers: ● rsync-backup.service
Not wanting to have to complete the above manual steps each boot, I have checked/tried the following:
- confirmed the SELinux contexts are correct.
- confirmed the permissions are correct.
- attempted adding a systemd.preset file (changes
enabledhowever, does not solve the original problem).
- confirmed that systemd checks the correct path via
- confirmed that btrfs subvolumes are mounted prior to
timer.targetsis run (by using
Some additional details that I think might have an affect:
/var/usrlocal) is a separate subvolume (i.e.
usrlocal) on a single btrfs volume (
I am not sure if I am doing some incorrectly or if this is a quirk of a Silverblue installtion (in combination with some of the quirks of my setup). Would greatly appreciate any assistance and happy to take advice or corrections and answer any questions.