I was working on something the other day and couldn’t make it work. I wanted the external drive to mount, then run the backup, then unmount. I couldn’t get it to work. The backintime program seems to want to run outside the thread, so the script would mount, fire up backintime, then immediately unmount. It was annoying. I suppose I might be able to have the script check once a minute or so if backintime was running and only unmount if not. I apparently need to think about it a bit more.
I’m not familiar with backintime, but my backup solution uses rsync, which does run inside the thread. My script mounts the drive, rsyncs to it, and then umounts it. Works perfectly every time.
OK, you'll have to include some logic in your script.
Launch backintime, find the PID (ps-aux| grep), perform a while loop to wait until the PID is done, then perform the unmount.
That should accomplish it.
Something I have always found a bit confusing is how Linux apps want to mount and unmount partitions, volumes, and drives like that.
Something I realized when installing a Mint one time is that sometimes after an action like that is chosen it needs to unmount the volume to make those wanted changes to it. What gave me a hint was during the install it required the internal drive to be unmounted before it could do it’s auto partition changes to it from the external ISO test drive/install USB stick.
I am still trying to figure out exactly when and why it wants to unmount different things like that depending on what you are trying to do. It seems random depending on the action wanted. But it always seems to work when I just trust it.
I am going to guess “backintime” is the same as the “timeshift” I use that comes boxed by default with this Mint. If so I found there are some configuration settings in the app that can be customized to make it do what you want it to do aside from the default configs.
I don’t know if that helps any but something that might be worth trying is disabling the backintime and download/install timeshift and see if it works better for your needs? It might have better configuration options?
I do know the “restore” snapshot apps like that work different than the actual “backup” apps work. So maybe an actual backup tool app with good config options might work better for what you are trying to do there?