Hi all,
I am using systemd-timers to start a bash script which updates my data to a Nas, and to a USB drive. Since I use Kinoite (again) I can’t get this to work as I want it to work. It does start the backup at the correct time and all, but also does that when I boot, or maybe better when I log in. This is not necessary.
I have the following files and their contents:
-rw-rw-r--. 1 user user 138 28 okt 12:24 Backup.service
cat Backup.service
[Unit]
Description="Backup data from internal HDD to Nas"
[Service]
ExecStart=/home/user/bin/Backup.sh
[Install]
WantedBy=default.target
and
-rw-rw-r--. 1 user user 179 28 okt 13:41 Backup.timer
cat Backup.timer
[Unit]
Description="Backup data from internal HDD to Nas"
After=multi-user.target
[Timer]
OnCalendar=21:30
Persistent=true
Unit=Backup.service
[Install]
WantedBy=timers.target
And I have a script which does the actual backup using rsync. This all works.
As said the backup script is started at the programmed time (21.30) but also at log-in.
What do I have to change to make it stop doing that? I have been all over the internet to find help and I found a 1001 different versions of the 2 files, all without a clear explanation what the codes in the files really do. I’m guessing it has to do with the After=, WantedBy= codes, but can’t figure out what they mean and do.
Who can help me?