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

Fail fast if symlinks not supported #145

Open
janhoy opened this issue Dec 14, 2023 · 2 comments
Open

Fail fast if symlinks not supported #145

janhoy opened this issue Dec 14, 2023 · 2 comments

Comments

@janhoy
Copy link

janhoy commented Dec 14, 2023

I accidentally configured backups to a folder which was a SMB mount on my linyux box. And the backups ran, but of course at the end of the script it failed due to no symlink support:

[/home/sia/test](ln: failed to create symbolic link 'backups/last/sia-latest.sql.gz': Operation not supported)

It would be better if either

  • Test a symlink and fail fast early with an error if filesystem not supported
  • or skip making symlinks and print a warning
  • or use hard-link for the "-latest" links
@prodrigestivill
Copy link
Owner

In the README are this requirements already exposed.

My undestanding is that the lastest symlink are meant to be readlink, but as a proposal it can be skipped if not supported by the filesystem.

@janhoy
Copy link
Author

janhoy commented Dec 14, 2023

I see that it is documented. But you also see in Discussions section that people still accidentally run the script on other file systems. So making the script complain is a better user experience than having to guess. And falling back to not creating soft-links to "latest" or using hard-links for "latest" is also a better user experience than no support at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants