backrest icon indicating copy to clipboard operation
backrest copied to clipboard

How to use VSS on multi-user Windows 10/11 ?

Open moritzthecat opened this issue 5 months ago • 1 comments

To make complete file backup on Windows 10/11 (in our case), it is evident to make use of Windows shadow copy service (VSS) to backup files that are exclusively locked by Windows. I have successfully followed the instructions here #375 to elevate the backrest-windows-tray.exe using the task scheduler in combination with setting Backup Flags: --use-fs-snapshot running with admin rights. But I cannot get this to work in the context of setting up backup plans for multiple users on this machine. From my past experience with Urbackup and Cobian, they make use of dedicated system service to allow multiple users defining/running their backups independently. What I tried but failed: Since Backrest installs for every user I thought I could just disable the autostart and start backrest-windows-tray.exe with elevated rights as dedicated task when each user logs on. But then I got access to the same web server running at http://localhost:9898. Can someone pls. point me in the right direction how to get this working please.

moritzthecat avatar Jul 24 '25 11:07 moritzthecat

Your steps are correct, the issue is that the network port binding is shared across all users. If you want to have multiple Backrest processes running simultaneously, you need to configure a unique port for each instance. Pass the following parameter to your scheduled task for backrest-windows-tray.exe file:

--bind-address 127.0.0.1:9899

Use whatever ports you prefer, as long as they are not in use by other applications. You will then need to update the Web UI shortcut with the new link.

Most of the time the locked files are useless anyway. For example, to omit MS Office lock files I use "~$*" as an exclusion.

Edit: my suggestion is wrong, the tray.exe doesn't support parameters. I was deceived by this commit description: https://github.com/garethgeorge/backrest/commit/1c97748e4d25403de3ae8543a716214f5185f2d6 Nevertheless, the backrest.exe does support this parameter, so you can just reconfigure your scheduled tasks to run backrest.exe directly (no systray). Just ensure to configure the task in a way that doesn't stop.

homandr avatar Jul 27 '25 20:07 homandr