Are the overall progress, processed file count and processed file size being updated on backups?

I am developing on Duplicati in this environment:

“ServerVersion”: “2.0.0.7”, (which is really weird because I’ve cloned the latest commit, Merge pull request #3346 from mikaelmello/patch-1 · duplicati/duplicati@258c5a6 · GitHub)
“ServerVersionName”: " - debug",
“ServerVersionType”: “Debug”,
“StartedBy”: “Tray icon”,
“BaseVersionName”: “Current”,
“DefaultUpdateChannel”: “Stable”,
“DefaultUsageReportLevel”: “Disabled”,
“ServerTime”: “2018-08-29T11:33:03.2298349-03:00”,
“OSType”: “Windows”,
“DirectorySeparator”: “\”,
“PathSeparator”: “;”,
“CaseSensitiveFilesystem”: false,
“MonoVersion”: null,

I tried to build it for Release, the build worked but when I tried to run I got an error along the lines of “Could not get resource http://localhost:3000/index.html” (or variations that I tried including ngax).

However, I noticed something that happens when I do backups:

During backup, those 3 variables are never updated in the progressstate API call. I did some digging and the UpdatefilesProcessed function is never called during backup, only during restore.

What I find weird is that when I download the latest release on the website, it works as it should. I haven’t checked the Network tab to see if the API call has the correct response but the progress bar does get updated.

I managed to fix it here by editing the class Duplicati.Library.Main.Operation.Backup.ProgressHandler to keep track of the number of files it has already processed and calling stat.OperationProgressUpdater.UpdatefilesProcessed(processedFileCount, processedFileSize); at each FileClosed event.

Steps to reproduce

  • Clone the latest commit and run using Visual Studio 2017 on Debug.
  • Make a large backup on any Backend and see that the progress bar is not updated, always hanging on the total file count.

Screenshots

Imagine a lot of API calls to progressstate with everything being updated except for

  "OverallProgress": 0.0,
  "ProcessedFileCount": 0,
  "ProcessedFileSize": 0,

Hello @mikaelmello, welcome to the forum!

It’s possible the issue you’re getting with “could not get resource” error is related to the location of your webroot folder (usually inside the Duplicati 2 program folder for installs or /bin/Release for Visual Studio builds).

I would suggest you try downloading the latest version again as 2.0.0.7 is VERY old (2.0.3.11 was just released) so you may just be running into an issue with that old version.

Yes, that is weird, but I did not want to make a commit changing all the version numbers for each release. Instead, the base version stays at 2.0.0.7, and then I update the version numbers when making the build.

The release build prevents you from serving files outside the launch folder (to avoid people exposing their local filesystem through the web server). Most likely the error happens because it cannot find the webroot folder under the bin/Release folder.

I did a lot of tinkering arond the progress reporting, so it is possible I missed this part. I recently fixed an issue with the scanner not reporting anything, and after that the progress bar seemed to move, but please put in a PR and I will have a look.

Thanks, the Release problem was fixed not much later but it wasn’t relevant to the issue anyway.

Regarding the version, I pointed in the issue that I had cloned the latest commit, which was in the v2.0.3.10-2.0.3.10_canary_2018-08-30.

Overall, thanks for explaining everything!

The release build prevents you from serving files outside the launch folder (to avoid people exposing their local filesystem through the web server). Most likely the error happens because it cannot find the webroot folder under the bin/Release folder.

I only discovered that I had to move the webroot to the Release folder after reading a significant amount of issues, the same goes to building an installer with my custom version of both back-end and front-end. Are you okay if I try to update the wikis in that direction?

Yes, please do :slight_smile: