Error with Bitlocker USB drive

Hello, I want to use a Bitlocker encrypted drive as the Duplicati destination as another layer of encryption.

It worked for the initial backup, but when the system reboots, the drive is not auto-mounted since it’s a USB disk, I have to enter passphrase to mount it as a Windows drive, normal stuff.

Now, the issue is when Duplicati sees that the drive is not mounted at system startup, it tries 5 times, gives up, and never tries again.

Would it be possible to retry, every hour or so, the Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify routine instead of just once at bootup?

Thanks for any help :slight_smile:

Those are the logs on my system:

Nov 6, 2017 7:08 AM: Message
Fatal error
Duplicati.Library.Interface.FolderMissingException: The folder E:\duplicati\ does not exist
at Duplicati.Library.Main.BackendManager.List()
at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)
at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
Nov 6, 2017 7:08 AM: Warning
Failed to create folder: The folder E:\duplicati\ does not exist
System.IO.IOException: This drive is locked by BitLocker Drive Encryption. You must unlock this drive from Control Panel.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Duplicati.Library.Main.BackendManager.ThreadRun()
Nov 6, 2017 7:08 AM: Retry
Operation List with file attempt 5 of 5 failed with message: The folder E:\duplicati\ does not exist
Duplicati.Library.Interface.FolderMissingException: The folder E:\duplicati\ does not exist
at Duplicati.Library.Main.BackendManager.List()
at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)
at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
Nov 6, 2017 7:08 AM: Warning
Failed to create folder: The folder E:\duplicati\ does not exist
System.IO.IOException: This drive is locked by BitLocker Drive Encryption. You must unlock this drive from Control Panel.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Duplicati.Library.Main.BackendManager.ThreadRun()
Nov 6, 2017 7:08 AM: Retry
Operation List with file attempt 4 of 5 failed with message: The folder E:\duplicati\ does not exist
Duplicati.Library.Interface.FolderMissingException: The folder E:\duplicati\ does not exist
at Duplicati.Library.Backend.File.List()
at Duplicati.Library.Main.BackendManager.DoList(FileEntryItem item)
at Duplicati.Library.Main.BackendManager.ThreadRun()

Something similar has been discussed (such as at Continue interrupted backup option - #3 by JonMikelV) but I don’t believe anything has been done to implement it.

Until that feature is added some options to do what you want include:

1 Like

Thanks, will do just that :slight_smile:

You can also set --retry-count=10000 if you really want it.

How often does the retry happen? There isn’t a --retry-frequency parameter I’m missing, is there?

If the retry-count value causes a job to run through to the next scheduled start time, does the currently running job keep retrying and the scheduled start time get skipped (in favor of the NEXT scheduled start time) or does the “missed” scheduled start time get added to the queue so as soon as the retry-count runs out it starts right up again (even if past the initial scheduled start time)?

There is, it is called --retry-delay=30s.

The retries do not interfere with the scheduler. It just makes it seem like the backup is taking a really long time as far as the scheduler is concerned.

So if I had a single backup job to a sometimes-available destination (such as USB drive or not-always-on NAS) I could schedule it for once daily with a 24 hour --retry-count and a 5 minute --retry-delay to approximate a “destination detected, start daily backup” scenario?

Depends on what you want, but it sounds correct.