Automounting fails with mount-start-limit-hit

That’d would be why you get the error that the network connection is not available. I suspect you need to look at the service, and make sure that it’s set to start After the network is online.

Edit:

I don’t know if this’ll work, but you could try adding this to the .automount:

[Unit]
After=network-online.target

OK.
We got it.

systemd was triggering python Backup script even without .timer unit enabled.

This was the reason. Disabling those services gives no errors.
Now I need to correct those backup services to trigger after network.

I learned a lot today :slight_smile:

Thanks for your help!

1 Like

This is a classic … :rofl: … xy problem construct

The same rule for mount / automont applies to service / timer

Don’t enable the service - only the timer - the backup service should have - if it uses a network share

Something like (from memory - please verify)

Require=network-online.target
After=network-online.target

If I understand you well, this After… should go into .service file? not .timer.

I did it this way and no problem with mount limit hit.
I’ll just wait and see if Bakup runs when expected.

Again thanks for help!

If it works, at least so far, then you understood correctly, I’d say.

:wink:

Just for the record and my curiosity - which backup program are you using?

The program you launch using a timer only?

https://www.freedesktop.org/software/systemd/man/systemd.timer.html

For each .timer file, a matching .service file exists (e.g. foo.timer and foo.service). The .timer file activates and controls the .service file. The .service does not require an [Install] section as it is the timer units that are enabled. If necessary, it is possible to control a differently-named unit using the Unit= option in the timer’s [Timer] section.
systemd/Timers - ArchWiki

Because one is directly attached hardware (USB Dongle), while the other (NAS) is on the network :wink:
So you need to check if the service on the machine (in the network) is active or not …

It’s like checking if your own home’s window is open vs asking your neighbor if their window is open or not…

Got it :slight_smile:

Just for the record and my curiosity - which backup program are you using?

It’s my own tool built for learning purposes.
Feel free to use it if you want.

I’m a rookie programmer so the code doesn’t look beautiful. But it does the job and doesn’t need attention.
This is a mirror type synchroniser. So it’s left to right.
I just developed two-way synchroniser which makes two exact copies. But it’s still work in progres. It lacks some functionalities. But it works if you want to try it.

https://github.com/inox-vision/PythonProjects/blob/master/02%20Mirror_Synchroniser/mirror-synchroniser.py