What happens if I have an external drive that is mounted for some backups but not others?
Reading through the documentation it seems that there would be no loss of data, but the external drive’s files would only be present in snapshots taken while the drive is mounted?
Is this an accurate understanding?
On Windows it might fail due to the missing drive letter, but on other platforms the mountpoint would just be empty and so yes, as you say, that directory would be empty in the backups where the drive was not mounted.
Note that if the drive is not present for a backup, the next time that the drive is present, restic will not be able to take the “fast path” for the contents of that drive since it doesn’t exist in the parent snapshot. All of the files will have to be re-hashed. This will not affect the correctness of the backup (a parent snapshot isn’t even required) but that backup will take longer.
You could work around this problem by taking two backups: the external drive, and everything else. Then don’t take a backup of the external drive when it isn’t mounted.