restic.errors.ResticFailedError: Restic failed with exit code 1: snapshot filter (Paths:[] Tags:[] Hosts:[]): no snapshot found #32

Closed
opened 2023-10-04 19:17:49 +00:00 by decentral1se · 1 comment
Owner

If you miss -e SNAPSHOT=latest then you get a stack trace which isn't the easier to parse. Should there be more guards put in place for missing env vars? These errors will show up on the abra side of things, so I think they need to be more user friendly.

./abra app run backup-bot-two.test.solisoft.top app backup -- ls
Traceback (most recent call last):
File "/usr/bin/backup", line 274, 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 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_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 191, in ls
results = list_files(snapshot, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/backup", line 204, in list_files
output = restic.internal.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: snapshot filter (Paths:[] Tags:[] Hosts:[]): no snapshot found

If you miss `-e SNAPSHOT=latest` then you get a stack trace which isn't the easier to parse. Should there be more guards put in place for missing env vars? These errors will show up on the `abra` side of things, so I think they need to be more user friendly. > ./abra app run backup-bot-two.test.solisoft.top app backup -- ls > Traceback (most recent call last): > File "/usr/bin/backup", line 274, 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 1688, in invoke > return _process_result(sub_ctx.command.invoke(sub_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 191, in ls > results = list_files(snapshot, path) > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/bin/backup", line 204, in list_files > output = restic.internal.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: snapshot filter (Paths:[] Tags:[] Hosts:[]): no snapshot found
Member

Missing -e SNAPSHOT=latest should not be the cause for this error. If no snapshot is proved it always chose latest. The problem here is no snapshot found. Are there any snapshots on the system?
This should provide a better error message:
a3faa5d51f

Missing `-e SNAPSHOT=latest` should not be the cause for this error. If no snapshot is proved it always chose `latest`. The problem here is `no snapshot found`. Are there any snapshots on the system? This should provide a better error message: https://git.coopcloud.tech/coop-cloud/backup-bot-two/commit/a3faa5d51f8e34239c0984e4a8f5d66e19188e1e
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#32
No description provided.