Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify notes about the port for Windows installation #604

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

homandr
Copy link
Contributor

@homandr homandr commented Dec 6, 2024

Apologies if I caused confusion around the port behaviour. Running the installer as you described with PowerShell would have the installer pick up the session variable and use the port for UI shortcuts, but Backrest itself would still listen on the default port upon the next reboot.
Also, using : instead of 127.0.0.1: would cause Backrest to listen on all interfaces, thus exposing it to outside access.

The correct way to define a user variable persistently is described in this commit. I also made changes to the installer, including the language around the port. If Backrest supported port definition through a command-line switch (like --port=), then I could add an option to the installer to take user input and create the startup shortcut with the switch. The switch would have to be available in the backrest-windows-tray.exe since this is what starts the software. Not saying it is needed, just explaining what would have to be done to avoid the environment variable steps I described. Unfortunately, Windows doesn't support passing session variables through shortcuts, unless using cmd wrapper script, which is a bit ugly.

Custom port is probably an advanced feature not needed by most users. I think what we have now is very reasonable.

Apologies if I caused confusion around the port behaviour. Running the installer as you described with PowerShell would have the installer pick up the variable and use the port for UI shortcuts, but Backrest would still listen on the default port.
Also, using :<port> instead of 127.0.0.1:<port> would cause Backrest to listen on all interfaces, thus exposing it to outside access.
The correct way to define a user variable persistently is described in this commit.
I also made changes to the installer, including the language around the port.
If Backrest supported port definition through a command-line switch (like --port=<port>), then I could add an option to the installer to take user input and create the startup shortcut with the switch. The switch would have to be available for the backrest-windows-tray.exe since that's what starts the software.
Not saying this is needed, just explaining what would have to be done to avoid the environment variable steps I described. Unfortunately, Windows doesn't support passing session variables  through shortcuts, unless using cmd wrapper script.
@garethgeorge
Copy link
Owner

garethgeorge commented Dec 6, 2024

Thanks for catching this! And very much appreciate the expanded instructions, that's non-trivial and will be very useful to anyone installing on multiple user accounts.

@garethgeorge garethgeorge merged commit b520d90 into garethgeorge:main Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants