I think @kenkendk meant the opposite: for getting VSS to work, the Duplicati server needs to be started with the SYSTEM account. An account with administrative privileges may not have the permission to create a VSS snapshot, in contrast to the SYSTEM account, which has full access to the local file system.
My guess is that you may use multiple Duplicati instances unintentionally. The Windows service activates a Duplicati server instance, listening on TCP port 8200 (unless another port was specified).
The Duplicati tray icon also has a built-in server instance, which is activated automatically at startup time. Since port 8200 is already in use by the service-based instance, the tray icon looks for an unused port, starting with 8300.
Take a look in the address bar of your web browser. What port number do you see? 8200 or 8300? If it’s port 8300, you are working in a user-based Duplicati instance with limited privileges. Changing the port number in the address bar to 8200 switches to the instance with full access to the file system.
You may need to copy or move the Duplicati data files to the folder that is used by the service-instance to migrate configured backup jobs to the service-based instance.
If you want to use the Duplicati Tray icon for quick access to the web interface, but disable the integrated server component, you have to add --no-hosted-server --hosturl=http://127.0.0.1:8200 to the properties of the shortcut to Duplicati.GUI.TrayIcon.exe.
Thanks for the explanation. Just a quick response from me is that yes the address bar in my web browser shows port 8300. I will read through your answer a couple of times so I fully understand it.
Will the switch to use port 8200 work as well in te web browser as it does now?
The fact that you see port 8300 indicates that you indeed run multiple instances of Duplicati. Probably the instance that listens on port 8200 is the service-based instance you intend to use and the tray icon built-in server component is an unwanted, additional instance that listens on port 8300.
If you don’t see any of your configured backup jobs in http://127.0.0.1:8200, you need to migrate (copy) the settings and backup jobs you configured in the Tray Icon instance to the service based instance.
I’ve quickly made a script that will do this for you. Start the script from a command prompt with elevated permissions (click Start, type cmd, right click Command prompt and click “Run as Administrator”). I did not test it extensively, use at your own risk!!!
@echo off
if exist "%LOCALAPPDATA%\Duplicati\Duplicati-server.sqlite" (set "SourceDir=%LOCALAPPDATA%\Duplicati")
if exist "%APPDATA%\Duplicati\Duplicati-server.sqlite" (set "SourceDir=%APPDATA%\Duplicati")
if "%SourceDir%"=="" goto NoSourcedirFound
echo Duplicati settings and local DB's found in
echo %SourceDir%
echo.
if not exist "%WINDIR%\System32\Config\systemprofile\." goto TargetUnreachable
echo Duplicati settings and local DB's will be copied to
echo %WINDIR%\System32\Config\systemprofile\AppData\Duplicati\.
echo.
if exist "%WINDIR%\System32\Config\systemprofile\AppData\Duplicati\." (
echo Duplicati settings end/or local DB's already found in target folder.
set /P Overwrite=Overwrite? [Y/N]
)
if /i "%Overwrite:~0,1%"=="N" goto ScriptAborted
set /p Correct=Is the information above correct? [Y/N]
if /i "%Correct:~0,1%"=="N" goto ScriptAborted
if not exist "%WINDIR%\System32\Config\systemprofile\AppData\Duplicati\." (md "%WINDIR%\System32\Config\systemprofile\AppData\Duplicati")
if not exist "%WINDIR%\System32\Config\systemprofile\AppData\Duplicati\." goto TargetUnreachable
xcopy "%Sourcedir%" "%WINDIR%\System32\Config\systemprofile\AppData\Duplicati\" /s/e/h/c/r/k
pause
goto :eof
:NoSourcedirFound
echo Duplicati sourcde folder was not found.
echo Script aborted.
pause
goto :eof
:TargetUnreachable
echo The System Profile folder cannot be found or no permissions to this folder.
echo Did you start the script with elevated permissions?
echo Script aborted.
pause
goto :eof
:ScriptAborted
echo Script aborted.
pause
goto :eof
Save the text above to CopyDuplicatiProfile.bat and launch it from your Administrative command prompt window.
The last error (“Previous volume not finished”) is caused by something else breaking. Instead of stopping the backup, it continues trying various things that all fail, and eventually gives the error message. In other words, the error hides the actual problem. I am working on a rewrite that will fix this problem and a few similar ones.
The for the other error, you should be able to look at the log and find the error messages for each individual file.
OK - on my CentOS7 where duplicati is being run as a service that sqlite file seems to in /root/.config/Duplicati
However, substituting the path, the command fails with an error
Operation List with file attempt 1 of 5 failed with message: The folder /usr/lib/duplicati/0 does not exist => The folder /usr/lib/duplicati/0 does not exist
What does that 0 mean in your command?
(As an aside, any way to use MySQL (MariaDB etc) instead of sqlite?)
I got the dbpath value out of “Export… As Command-line”. The --verbose parm makes sure all changes are listed rather than just a summary.
Here’s the actual help text for the Compare command, in case it helps…
Duplicati.CommandLine.exe help compare
Usage: compare <storage-URL> [<base-version>] [<compare-to>] [<options>]
Compares two backups and shows differences. If no versions are given,
changes are shown between the two latest backups. The versions can either
be timestamps or backup version numbers. If only one version is given, the
most recent backup is compared to that version.
--verbose
Shows names of files
--include=<filter>
Adds an include filter (for verbose output)
--exclude=<filter>
Adds an exclude filter (for verbose output)
Enter encryption passphrase:
No local database, accessing remote store
Listing remote folder …
Operation List with file attempt 1 of 5 failed with message: The folder /root/.config/Duplicati/WEDOSRHNZJ.sqlite does not exist => The folder /root/.config/Duplicati/WEDOSRHNZJ.sqlite does not exist
Listing remote folder …
Operation List with file attempt 2 of 5 failed with message: The folder /root/.config/Duplicati/WEDOSRHNZJ.sqlite does not exist => The folder /root/.config/Duplicati/WEDOSRHNZJ.sqlite does not exist
mono_os_mutex_trylock: pthread_mutex_trylock failed with “Invalid argument” (22)
Aborted (core dumped)
[root@gateway2 duplicati]#
[root@gateway2 duplicati]#
[root@gateway2 duplicati]# ls /root/.config/Duplicati/
control_dir_v2/ dbconfig.json Duplicati-server.sqlite WEDOSRHNZJ.sqlite
Oh, and yes - Duplicati is so close to exactly what I want too! (And you’re welcome - I appreciate your patience with the oh-so-painful process of remote / blind debugging.)
@kees-z
Thanks for your support and script. Even though I used the script the backup list was empty on the address http://127.0.0.1:8200. I took me a little tinkering to export and import the backups but it works great now with the VSS now. One question is though being how do I change the address from port 8300 to port 8200 for the tray icon because every time I double click the Duplicati icon in the tray bar it opens up in the browser with the 8300 address. Do I need the port 8300 anyway?
Best Regards
Sorry to hear the script didn’t work for you. Did you get any error messages running it? Did the script propose the correct source and destination paths before the copy process started?
Glad to hear that. Thanks for the feedback!
I suppose @JonMikelV answered that question sufficiently. In addition to that, optionally add --hosturl=http://127.0.0.1:8200 (replace with address and port Duplicati server is actually running with) to connect to the correct instance.
I have added the following shortcut in the “target” box of the shortcut for the tray icon:
“C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe” –no-hosted-server
But when I start it, it still opens up port 8300 in the browser.
Sorry to hear the script didn’t work for you. Did you get any error messages running it? Did the script propose the correct source and destination paths before the copy process started?
No, it didn’t show any errors it actually all went fine and the databases where copied. But I still had to export the settings from the browser 8300 to the browser with the port 8200. Then I actually had to copy the database files to the new location and edit the “Local database path:” so it would point to the right database file. Then I just repaired the database, just to be on the safe side.
I suppose @JonMikelV answered that question sufficiently. In addition to that, optionally add --hosturl=http://127.0.0.1:8200 (replace with address and port Duplicati server is actually running with) to connect to the correct instance.
Actually @JonMikelV suggestion won’t work for me, see above. Sorry for being kind of stupid but where do I add “–hosturl=http://127.0.0.1:8200”?
Also, a last small question, very often when I open the page “http://localhost:8200/ngax/index.html#/” the following message pops up in the middle of the monitor: Missing XSRF Token I just hit OK and the backup works but how can I get rid of the message?
It looks like your command line options start with a single dash "-". All command line options should be preceeded with a double dash "--", so the properties of your shortcut to the tray icon should be: