-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No command besides "init" should create a repository #1167
Labels
Comments
Oh, interesting! That's indeed a bug and I agree with you that only |
Thanks for the super fast response! |
Yeah, I've already triaged the problem ;) |
You're awesome :-) |
fd0
added a commit
that referenced
this issue
Aug 27, 2017
It was discovered that restic creates directories when a non-existing directory is specified as a local repository.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of
restic version
restic 0.7.1
compiled with go1.8.3 on linux/amd64
Today, restic scared my good.
I ran
restic -r /mnt/bacup/restic snaphosts
and gotI quickly checked /mnt/bacup/restic/ and indeed, the config file was missing. I was already worried that my repository was hosed. Then it dawned on me, that I simply had typoed the repository path (which should have been /mnt/backup/restic).
restic unhelpfully had created a /mnt/bacup/restic directory/repository.
Imho, restic should never auto-create a repository. The only time this should happen is on
restic init
.It should simply return an error in such a case.
To reproduce the error, run
restic -r /tmp/typo snapshots
and see that restic has created something at /tmp/typo which looks like a (incomplete) repository.The text was updated successfully, but these errors were encountered: