borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
10.73k stars 733 forks source link

`borgfs` in Standalone Binary Installation Docs #8207

Open gitspeaks opened 1 month ago

gitspeaks commented 1 month ago

I noticed a potential issue in the Standalone Binary installation section of the documentation where it suggests creating a symlink to make borgfs an alias for borg mount

Quote:

Optionally you can create a symlink to have borgfs available, which is an alias for borg mount:

ln -s /usr/local/bin/borg /usr/local/bin/borgfs

A symlink to borg will just replicate the borg command under a new name, borgfs, but does not restrict or modify its behavior to only execute borg mount.

The documentation might consider suggesting the use of a shell alias or a wrapper script instead.

For example:

alias borgfs='borg mount'
ThomasWaldmann commented 1 month ago

Usually that works, borg internally detects the name by which it was invoked and then behaves differently.

Try:

If one or more of these does not behave like "borg mount" when invoked as borgfs, please add which of these exactly to your original bug report.

gitspeaks commented 1 month ago

Thanks for the clarification! I've tested it and you're right, it works as expected. I suggest adding a note to the documentation explaining that Borg internally detects the name by which it was invoked and adjusts its behavior accordingly. This isn't immediately apparent, and such a note would help clarify why creating a symlink serves as a functional alias.