[Skip to the embarassing conclusion by going down to “SOLVED”]
This morning I tried to re-run the backup to NAS folder that I’d done the other day but it complained the database was in need of repair. I tried to ‘repair’ and ‘delete and recreate’ a few times but kept getting errors so eventually I just blew away the ~/.config/Duplicati/ sqlite file corresponding to that backup. Then I exported the job to commandline and ran it in a terminal. It ran successfully a number of times to completion. So I tried ‘run now’ in the GUI and it ran to completion successfully a couple of times. This is something I’d never seen before so that was encouraging. I removed the ‘–send-mail-to=’ option when I did that so that was interesting but I was dubious that it was related.
So then I created a new backup but to my googledrive. Same options as the local-nas backup that was successful, only a different destination. I exported to commandline again and ran it in terminal and it ran successfully to completion:
mono /Applications/Duplicati.app/Contents/Resources/Duplicati.CommandLine.exe backup “googledrive://Backups/test3?authid=ce0f6fb86a37fe5d93e0333c81fc6a52%3Ap_N0m”‘!’“7Us7s6Oz9kFnZaR” /Users/hpeyerl/Software/ --backup-name=googledrivetest --dbpath=/Users/hpeyerl/.config/Duplicati/LKPUZURPWS.sqlite e=aes --compression-module=zip --dblock-size=100MB --passphrase=mumble --log-level=Information --log-file=duplicati.log --default-filters=OSX --disable-module=console-password-input
Backup started at 9/19/2018 6:22:40 AM
Checking remote backup …
Listing remote folder …
Scanning local files …
228 files need to be examined (25.56 MB)
0 files need to be examined (0 bytes)
removing temp files, as no data needs to be uploaded
Checking remote backup …
Listing remote folder …
removing file listed as Temporary: duplicati-bd49f09fe351e4f75b6beb11ad8d7d056.dblock.zip.aes
removing file listed as Temporary: duplicati-i729e9c4547dd4a39ad31d43e66370272.dindex.zip.aes
Verifying remote backup …
Remote backup verification completed
Downloading file (13.11 KB) …
Downloading file (29.56 KB) …
Downloading file (20.71 MB) …
Duration of backup: 00:00:08
Remote files: 3
Remote size: 20.76 MB
Total remote quota: 1.00 TB
Available remote quota: 353.27 MB
Files added: 0
Files deleted: 0
Files changed: 0
Data uploaded: 0 bytes
Data downloaded: 20.76 MB
Backup completed successfully!
Encouraged, I ran it again but added a --send-mail-to and the job did not complete.
mono /Applications/Duplicati.app/Contents/Resources/Duplicati.CommandLine.exe backup “googledrive://Backups/test3?authid=mumble” /Users/hpeyerl/Software/ --backup-name=googledrivetest --dbpath=/Users/hpeyerl/.config/Duplicati/LKPUZURPWS.sqlite e=aes --compression-module=zip --dblock-size=100MB --passphrase=mumble --log-level=Information --log-file=duplicati.log --default-filters=OSX --disable-module=console-password-input --send-mail-to="hpeyerl+duplicati@beer.org"
Backup started at 9/19/2018 6:23:19 AM
Checking remote backup …
Listing remote folder …
Scanning local files …
228 files need to be examined (25.56 MB)
0 files need to be examined (0 bytes)
removing temp files, as no data needs to be uploaded
Checking remote backup …
Listing remote folder …
removing file listed as Temporary: duplicati-b036751bac0534fe9830cb979173bf7d4.dblock.zip.aes
removing file listed as Temporary: duplicati-ic523c59ec8194685944e0069a7ed8997.dindex.zip.aes
Verifying remote backup …
Remote backup verification completed
Downloading file (13.11 KB) …
Downloading file (29.56 KB) …
Downloading file (20.71 MB) …
hang for >10 minutes.
However, while in that state, I then went to the web interface and clicked ‘Run now’ on the same job (with no email configured) and it ran to completion, while the aforementioned command line job was hung. I was able to do that a few times, including CommandLine within the browser (not to be confused with the above command line ones which were done in a terminal session):
Backup started at 9/19/2018 6:37:26 AM
Checking remote backup …
Listing remote folder …
Scanning local files …
224 files need to be examined (15.77 MB)
0 files need to be examined (0 bytes)
removing temp files, as no data needs to be uploaded
Checking remote backup …
Listing remote folder …
removing file listed as Temporary: duplicati-bedc3ac53d1004f1c8178be5ca112a9ff.dblock.zip.aes
removing file listed as Temporary: duplicati-i45dea23f32a94a7dbdc068ea89b015a1.dindex.zip.aes
Verifying remote backup …
Remote backup verification completed
Downloading file (13.11 KB) …
Downloading file (29.56 KB) …
Downloading file (20.71 MB) …
Duration of backup: 00:00:08
Remote files: 3
Remote size: 20.76 MB
Total remote quota: 1.00 TB
Available remote quota: 353.27 MB
Files added: 0
Files deleted: 0
Files changed: 0
Data uploaded: 0 bytes
Data downloaded: 20.76 MB
Backup completed successfully!
Return code: 1
So this is new because I’ve not been able to do that before. The only change is really the email which is curious. For the sake of completion, I re-ran the same backup again in the browser in CommandLine, with the --send-mail-to= option and curiously it hung in the same way as the run that was hung in the terminal.
SOLVED
After this result, I dug into the mail thing and realized that I hadn’t set up all the rest of the options. I do remember when initially configuring Duplicati, I just somehow turned on email status reports and then the default recipient address was some bogus default that I changed to my own recipient. In the back of my mind I wondered how it would know which mail server to use, etc but assumed it would just use my local mail client to do the sending… This morning I noticed there was additional options including the smtp server URL, etc. After setting that, my mail server auth info, I was able to re-run the job and it completed successfully and I got an email.
Backup started at 9/19/2018 6:48:38 AM
Checking remote backup …
Listing remote folder …
Scanning local files …
228 files need to be examined (25.56 MB)
0 files need to be examined (0 bytes)
removing temp files, as no data needs to be uploaded
Checking remote backup …
Listing remote folder …
removing file listed as Temporary: duplicati-b1f9f896518c841a08447c8d5f6d95038.dblock.zip.aes
removing file listed as Temporary: duplicati-ib129573459c247b8b74362b0a689d6a3.dindex.zip.aes
Verifying remote backup …
Remote backup verification completed
Downloading file (13.11 KB) …
Downloading file (29.56 KB) …
Downloading file (20.71 MB) …
Email sent successfully using server: smtp://mumble:587/?starttls=when-available
Duration of backup: 00:00:09
Remote files: 3
Remote size: 20.76 MB
Total remote quota: 1.00 TB
Available remote quota: 353.27 MB
Files added: 0
Files deleted: 0
Files changed: 0
Data uploaded: 0 bytes
Data downloaded: 20.76 MB
Backup completed successfully!
We can see that the mail gets sent after the point where the other backups hung. I was able to reproduce the same hang in the web browser by incorrectly configuring the mail server.
That left me to wonder how to reproduce what I originally saw when I installed Duplicati. Because I don’t remember going to “advanced options” at the time and thought that “send mail” was already there and populated with a bogus address. So I killed Duplicati, the process, and blew away $HOME/.config/duplicati, and then restarted Duplicati… I was in a clean configuration but I was not able to find the pre-populated default mail recipient that I remembered from when I first installed Duplicati. I also browsed through github looking for the change but didn’t find it.
In Summary, I believe that it was an incompletely configured email setup in the options that was the entire cause of the problem. It would have been helpful if Duplicati had said something like “Emailing Status report” prior to attempting to send the mail but that’s about it. I guess it would also be useful to have some sanity checking in the email config and/or a timeout. The rest is my fault.
Thanks for all of your help. I also now understand better how Duplicati is put together.