-
Notifications
You must be signed in to change notification settings - Fork 86
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
failed to complete restore [..] no snapshot found #1484
Comments
Hello @sgielen! Can you show the |
Yes, here it is:
|
what are the mount paths provided in the backup and restore volumes? are they same? |
Could you please provide some information about your Snapshot? To list your Snapshots, run the following command: Stash should return the successful Snapshots in the backup namespace after executing the command. Please provide a YAML of a Snapshot from the list. To get the snapshot YAML, run the command: |
I think so; RestoreSession:
BackupConfiguration:
|
I have no snapshots in either
Interestingly,
|
One thing that also jumps out to me is that the backup BackupSession
This mentions host |
Yes. You are right. You have used Try this RestoreSession. apiVersion: stash.appscode.com/v1beta1
kind: RestoreSession
metadata:
name: restore
namespace: gitea-restore
spec:
repository:
name: gitea-to-b2
namespace: stash
target: # target indicates where the recovered data will be stored
ref:
apiVersion: apps/v1
kind: StatefulSet
name: gitea
volumeMounts:
- mountPath: /data
name: data
rules:
- paths:
- /data
sourceHost: gitea |
With
Would you recommend not using an So this issue #1484 is about two topics: (1) (2) if restore fails within the init container, it prints an error and a stack trace, but it still exits 0 with "restore completed successfully" which is not expected behavior. Please let me know if you would prefer me filing a separate issue for either. |
Unfortunately, we can't detect if restore in this scenario failed or not. The restore process has found no data in the backend for the intended target. Hence, it restored nothing. It assumed that it has restored all data. |
I am trying to validate my Stash backups by performing a restore to a different namespace. However, I am encountering the "no snapshot found" error during restore.
First, I performed a backup to Backblaze B2, and the snapshot seems to have been created successfully: the BackupSession is successful; in the bucket,
/stash/gitea/snapshots/<long filename>
exists; the/bin/restic check
in the backup container logs indicates no errors were found. Also, SNAPSHOT-COUNT is 1:So, I created a new namespace
gitea-restore
and created the PVC, an Ingress with a different name, a RestoreSession according to https://stash.run/docs/v2022.07.09/guides/use-cases/cross-cluster-backup/, and the StatefulSet itself. The RestoreSession contains the same Repository as the BackupConfiguration; its YAML is below. Indeed, Stash created an init container in the StatefulSet, whose logs contain:Two things jump out to me. First of all: the init container failed to restore, but it still said "restore completed successfully" and exited 0. So, now, my Gitea container is running without data, while I had expected the init container to fail and further setup of the application to block.
But, worse still, the restore itself failed. With the RestoreSession pointing at the same Repository as the BackupSession (
gitea-to-b2
in the namespacestash
), I would have expected it to find the exact same backups in the same directory in the same bucket, but it finds no snapshots. I tried to take a look at the contents of the snapshot, but it's binary gibberish so I don't know what's in it. Could you help me figure out why this is / what's going on?Here's the RestoreSession YAML:
The text was updated successfully, but these errors were encountered: