Improve check whether remote backup target is ready
Summary
When a scheduled backup is about to be executed, and the backup drive is not ready (not connected, not reachable, etc.), Deja Dup takes care of postponing the backup and notifying the user about it. However, the check that determines whether the backup gets postponed or not currently leaves room for improvement.
The check currently is performed by trying to mount the backup device. If that fails, the backup will be postponed as it should. If if fails because it already is mounted on the other hand, the backup will only be postponed if there is no network connection at all. This leaves out cases where the backup device is mounted, there is an internet connection, but the device still is not reachable (because it is in another local network, turned off, disconnected, on fire, etc.).
Reproduction Steps
Setup Deja Dup with a remote backup device (like a NAS). Mount the backup device in your file manager. Disconnect or turn off the backup device, but leave it mounted. Set the backup schedule in Deja Dup to daily.
Now, Deja Dup will attempt to start the backup, but fail ungracefully. The error message is going to say nothing about postponing the backup, although the backup will still be postponed secretly (but that's another topic).