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

Confusing scenario #210

Closed
shawwn opened this issue Aug 25, 2018 · 3 comments
Closed

Confusing scenario #210

shawwn opened this issue Aug 25, 2018 · 3 comments

Comments

@shawwn
Copy link
Contributor

shawwn commented Aug 25, 2018

As a user, I experienced something quite confusing. I thought I'd better report it to be safe:


[8/25/18 1:40 PM] Backup disruption queued.
[8/25/18 1:40 PM] Backup disruption is running.
[8/25/18 1:40 PM] Backup disruption completed. (244.97 kB new data on Tarsnap)
[8/25/18 1:41 PM] Backup disruption queued.
[8/25/18 1:41 PM] Backup disruption is running.
[8/25/18 1:41 PM] Backup disruption failed: tarsnap: An archive already exists with the name "disruption"
[8/25/18 1:42 PM] Backup disruption1 queued.
[8/25/18 1:42 PM] Backup disruption1 is running.
[8/25/18 1:42 PM] Backup disruption1 completed. (3.72 kB new data on Tarsnap)
[8/25/18 1:43 PM] Fetching contents for archive disruption1...
[8/25/18 1:43 PM] Fetching contents for archive disruption1... done.
[8/25/18 1:47 PM] Backup disruption1  queued.
[8/25/18 1:47 PM] Backup disruption1  is running.
[8/25/18 1:47 PM] Backup disruption1  completed. (3.72 kB new data on Tarsnap)

Result:

image

Why did Tarsnap fail to create two archives named "disruption", but it successfully created two archives named "disruption1"? I expected that Tarsnap would fail to create the second "disruption1" and was mildly shocked when it succeeded.

If it's expected that you should be able to create archives with identical names, then why did Tarsnap fail to create two archives named "disruption"?

@gperciva
Copy link
Member

!!!

Tarsnap shouldn't be able to have two archives names disruption1. The only thing that I can think of is that one of them might be disruption1.part and the GUI is hiding the name. Or maybe it's hiding some other part of the name (like a timestamp)?

Can you go to the command-line and try:

tarsnap --list-archives -vv

and send the result to me by email? (assuming that you're sharing the key between gui and CLI)

@shawwn
Copy link
Contributor Author

shawwn commented Aug 25, 2018

Aha. I believe one archive is named "disruption1" and the other is named "disruption1 ". Note the trailing space.

Yup, that was what happened:

image

Interesting UI corner case. Should we trim leading/trailing whitespace from archive names? At least for the purposes of creating them.

@gperciva
Copy link
Member

I've disallowed archive and job names that begin or end with whitespace, so this should avoid the confusion scenario.

(I think it's better to stop people from creating such archives, instead of silently removing whitespace.)

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

No branches or pull requests

2 participants