backup -- create: Fatal: wrong password or no key found #36

Closed
opened 2023-10-12 13:31:38 +00:00 by decentral1se · 5 comments
Owner

From a freshly deployed backup-bot-two which I ran app secret generate -a on.

🌻 ./abra app secret generate -a backup-bot-two.foo.com
+-----------------+-------------------------------------------------------+
| NAME | VALUE |
+-----------------+-------------------------------------------------------+
| restic_password | zoning-barrier-storewide-unisexual-obsessed-partition |
+-----------------+-------------------------------------------------------+

🌻 ./abra app backup create abra-test-recipe.foo.com
Traceback (most recent call last):
File "/usr/bin/backup", line 294, in
cli()
File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1685, in invoke
super().invoke(ctx)
File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/backup", line 37, in cli
init_repo()
File "/usr/bin/backup", line 52, in init_repo
raise error
File "/usr/bin/backup", line 46, in init_repo
restic.cat.config()
File "/usr/lib/python3.11/site-packages/restic/internal/cat.py", line 17, in config
return self.run(cmd)
^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/restic/internal/cat.py", line 20, in run
return json.loads(command_executor.execute(cmd))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/restic/internal/command_executor.py", line 25, in execute
raise restic.errors.ResticFailedError(
restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key found
FATA[0005] Status: , Code: 1

From a freshly deployed `backup-bot-two` which I ran `app secret generate -a` on. > 🌻 ./abra app secret generate -a backup-bot-two.foo.com > +-----------------+-------------------------------------------------------+ > | NAME | VALUE | > +-----------------+-------------------------------------------------------+ > | restic_password | zoning-barrier-storewide-unisexual-obsessed-partition | > +-----------------+-------------------------------------------------------+ > > 🌻 ./abra app backup create abra-test-recipe.foo.com > Traceback (most recent call last): > File "/usr/bin/backup", line 294, in <module> > cli() > File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ > return self.main(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main > rv = self.invoke(ctx) > ^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 1685, in invoke > super().invoke(ctx) > File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke > return ctx.invoke(self.callback, **ctx.params) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke > return __callback(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/bin/backup", line 37, in cli > init_repo() > File "/usr/bin/backup", line 52, in init_repo > raise error > File "/usr/bin/backup", line 46, in init_repo > restic.cat.config() > File "/usr/lib/python3.11/site-packages/restic/internal/cat.py", line 17, in config > return self.run(cmd) > ^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/restic/internal/cat.py", line 20, in run > return json.loads(command_executor.execute(cmd)) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/restic/internal/command_executor.py", line 25, in execute > raise restic.errors.ResticFailedError( > restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key found > FATA[0005] Status: , Code: 1
Author
Owner

Once I rm'd and re-create this, it worked! Issue on my end, I guess.

Would it an idea to try and drop the huge stack traces? Is there anyway to just pass back the restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key part and not the whole thing?

Then I ran the create:

🌻 ./abra app backup create abra-test-recipe.foo.com
{'message_type': 'summary', 'files_new': 2, 'files_changed': 0, 'files_unmodified': 0, 'dirs_new': 7, 'dirs_changed': 0, 'dirs_unmodified': 0, 'data_blobs': 2, 'tree_blobs': 8, 'data_added': 3344, 'total_files_processed': 2, 'total_bytes_processed': 55, 'total_duration': 0.451258626, 'snapshot_id': '0dc391401dba965aebb7c4f4872bd1510dbc5b33c46e24ce23b08bf5c51985e9'}

What should I output on the abra side after parsing this? What is good to include? I think it would be good to know which paths, at least? I can read the volumes from the recipe config or?

Once I rm'd and re-create this, it worked! Issue on my end, I guess. Would it an idea to try and drop the huge stack traces? Is there anyway to just pass back the `restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key` part and not the whole thing? Then I ran the create: > 🌻 ./abra app backup create abra-test-recipe.foo.com > {'message_type': 'summary', 'files_new': 2, 'files_changed': 0, 'files_unmodified': 0, 'dirs_new': 7, 'dirs_changed': 0, 'dirs_unmodified': 0, 'data_blobs': 2, 'tree_blobs': 8, 'data_added': 3344, 'total_files_processed': 2, 'total_bytes_processed': 55, 'total_duration': 0.451258626, 'snapshot_id': '0dc391401dba965aebb7c4f4872bd1510dbc5b33c46e24ce23b08bf5c51985e9'} What should I output on the `abra` side after parsing this? What is good to include? I think it would be good to know which paths, at least? I can read the volumes from the recipe config or?
Member

Once I rm'd and re-create this, it worked! Issue on my end, I guess.

Would it an idea to try and drop the huge stack traces? Is there anyway to just pass back the restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key part and not the whole thing?

For debugging the whole stacktrace is quite important. Do you know how to reproduce this? If it's a typical user input error we could catch it, and provide a better error message how to solve it.

Then I ran the create:

🌻 ./abra app backup create abra-test-recipe.foo.com
{'message_type': 'summary', 'files_new': 2, 'files_changed': 0, 'files_unmodified': 0, 'dirs_new': 7, 'dirs_changed': 0, 'dirs_unmodified': 0, 'data_blobs': 2, 'tree_blobs': 8, 'data_added': 3344, 'total_files_processed': 2, 'total_bytes_processed': 55, 'total_duration': 0.451258626, 'snapshot_id': '0dc391401dba965aebb7c4f4872bd1510dbc5b33c46e24ce23b08bf5c51985e9'}

What should I output on the abra side after parsing this? What is good to include? I think it would be good to know which paths, at least?

I think files_new, files_changed, data_added, total_duration and snapshot_id could be useful as output.

I can read the volumes from the recipe config or?

Not sure what you mean?

> Once I rm'd and re-create this, it worked! Issue on my end, I guess. > > Would it an idea to try and drop the huge stack traces? Is there anyway to just pass back the `restic.errors.ResticFailedError: Restic failed with exit code 1: Fatal: wrong password or no key` part and not the whole thing? For debugging the whole stacktrace is quite important. Do you know how to reproduce this? If it's a typical user input error we could catch it, and provide a better error message how to solve it. > Then I ran the create: > > > 🌻 ./abra app backup create abra-test-recipe.foo.com > > {'message_type': 'summary', 'files_new': 2, 'files_changed': 0, 'files_unmodified': 0, 'dirs_new': 7, 'dirs_changed': 0, 'dirs_unmodified': 0, 'data_blobs': 2, 'tree_blobs': 8, 'data_added': 3344, 'total_files_processed': 2, 'total_bytes_processed': 55, 'total_duration': 0.451258626, 'snapshot_id': '0dc391401dba965aebb7c4f4872bd1510dbc5b33c46e24ce23b08bf5c51985e9'} > > What should I output on the `abra` side after parsing this? What is good to include? I think it would be good to know which paths, at least? I think `files_new`, `files_changed`, `data_added`, `total_duration` and `snapshot_id` could be useful as output. > I can read the volumes from the recipe config or? Not sure what you mean?
Author
Owner

For debugging the whole stacktrace is quite important. Do you know how to reproduce this? If it's a typical user input error we could catch it, and provide a better error message how to solve it.

RIght yeh, maybe I could pass --debug from abra to -e DEBUG=true to the backup-bot-two? I think it's better to have less chaotic stacktraces as the default. Maybe fine for now though, no major issue. Not sure how to reproduce this no, sorry.

Not sure what you mean?

From the output of abra app backup create abra-test-recipe.foo.com I don't know how these stats connect to which volume is defined in the recipe config. If I show a files_new which volume is that related to? Is there a way to know this?

> For debugging the whole stacktrace is quite important. Do you know how to reproduce this? If it's a typical user input error we could catch it, and provide a better error message how to solve it. RIght yeh, maybe I could pass `--debug` from `abra` to `-e DEBUG=true` to the `backup-bot-two`? I think it's better to have less chaotic stacktraces as the default. Maybe fine for now though, no major issue. Not sure how to reproduce this no, sorry. > Not sure what you mean? From the output of `abra app backup create abra-test-recipe.foo.com` I don't know how these stats connect to which volume is defined in the recipe config. If I show a `files_new` which volume is that related to? Is there a way to know this?
Member

From the output of abra app backup create abra-test-recipe.foo.com I don't know how these stats connect to which volume is defined in the recipe config. If I show a files_new which volume is that related to? Is there a way to know this?

restic is doing the backup over all volumes at once and I just forward the output of restic. Unfortunately I don't see a way to differentiate the stats per volume.
We could run a single backup for each volume, but I think this would increase the overhead, also the volumes would be split over multiple snapshots. That wouldn't be ideal.

> From the output of `abra app backup create abra-test-recipe.foo.com` I don't know how these stats connect to which volume is defined in the recipe config. If I show a `files_new` which volume is that related to? Is there a way to know this? `restic` is doing the backup over all volumes at once and I just forward the output of `restic`. Unfortunately I don't see a way to differentiate the stats per volume. We could run a single backup for each volume, but I think this would increase the overhead, also the volumes would be split over multiple snapshots. That wouldn't be ideal.
Author
Owner

Moved on, unsure what is actionable here, let's close.

Moved on, unsure what is actionable here, let's close.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/backup-bot-two#36
No description provided.