Repository navigation
Recovering old, "deleted" backups from s3 versions/b2 hiding #10017
Unanswered
travisby
asked this question in
Community support Q&A
Replies: 1 comment
|
Not simple, but I... kopia repository connect s3 --access-key $KOPIA_B2_KEY_ID --bucket $bucket --secret-access-key $KOPIA_B2_KEY -p $KOPIA_PASSWORD --prefix kopia/$app/ --readonly --endpoint s3.us-west-001.backblazeb2.com --point-in-time "2026-07-06T10:04:05Z"`
....
kopia sync-to s3 --bucket=$newbucket --access-key=$newak --secret-access-key=$newsak -p $KOPIA_PASSWORD --prefix kopia/$app/ --endpoint s3.us-west-001.backblazeb2.com
...used b2 ls 'b2://$bucket/backups/velero-daily-20260707*/velero-backup.json' --with-wildcard --versions --recursive | head -1
backups/velero-daily-20260707224917/velero-backup.jsonunhid it: b2 ls b2://$bucket/backups/velero-daily-20260707224917 --recursive --versions | sort | uniq | xargs -I{} b2 file unhide b2://$bucket/{}.... copied it over b2 sync b2://$bucket/backups/velero-daily-20260707224917 b2://$newbucket/backups/velero-daily-20260707224917... ran created a new StorageBackupLocation with the new bucket name ... EDITED the backup.velero.io object and changed And finally restored with I'd still love if anyone had a better/alternative, but I think I can make this work for the ~10 namespaces I need! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello!
I had a catastrophic ceph failure about a week ago.
There'll be a lot of supporting documentation below (and hopefully help for someone else in a sticky situation like this), but the tl;dr is:
The underlying kopia data exists, I can "unhide" velero backups, but it doesn't look at hidden kopia files. How can I do one of the following to recover data:
I have a good number of volumes that I'd like to avoid a creating individual pods, mounting volumes, curling, and extracting if possible!
I take daily backups with a ttl of 7d.
My helm values.yaml ends up looking like:
I naturally went to restore backups after noticing, on the 8th day 💀 .
Velero happily tells me that there's no (usable/from the date before the outage) backups that remain, however in the B2 ui I see plenty of objects, just hidden.
I found one backup I was interested in, and executed:
to unhide the velero backup. I then had to wrestle with the TTL expiration, velero wanted to kill it immediately 😅 . I updated the backup location be ReadOnly (I should have done this first) to prevent the expiration cleaner upper from immediately hiding those objects again:
velero backup-location get -o yaml | yq .spec.accessMode ReadOnlyvelero get backupwouldn't include it, but if I manually primed...velero get backup velero-daily-20260701050042then it would appearNow, we can see at least some better backups:
And we could initiate a restore:
velero restore create --from-backup velero-daily-20260701050042 --include-cluster-resources=trueA restore (after deleting pvcs) ended up executing, but the download failed, unsurprisingly, with:
Unsurprisingly, the kopia snapshots are hidden too.
At this point, unconfident in the kopia repository layout to do the same unhiding trick, I switched to kopia directly.
I found kopia's --point-in-time support, and ran:
and was able to see backups that neither velero, nor kopia without
--point-in-timecould see.kopia snapshot list --all | tail 2026-06-25 01:01:05 EDT k79813829099866b9e7bfdda86d9d66cc 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-10,hourly-10,daily-10) pins:velero-pin 2026-06-26 01:01:50 EDT k0c3c856f51d0ea447c9dd82984f60fb7 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-9,hourly-9,daily-9) pins:velero-pin 2026-06-27 01:01:28 EDT ka7dd61627ec7bafc6e4f7294c46edc16 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-8,hourly-8,daily-8) pins:velero-pin 2026-06-28 01:01:16 EDT kcf7b4fb8197586f0a756c9dd295a5c46 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-7,hourly-7,daily-7,weekly-2) pins:velero-pin 2026-06-29 01:01:25 EDT kd80c1c1a6b8482d5bd352b3f2e6854ab 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-6,hourly-6,daily-6) pins:velero-pin 2026-06-30 01:01:23 EDT k3dc803d82241ab00f7c176fc06eb6433 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-5,hourly-5,daily-5,monthly-2) pins:velero-pin 2026-07-01 01:01:17 EDT keeb64de98db837cfd404c8f48976190c 648.5 MB dgrwxrwxr-x files:5794 dirs:605 (latest-4,hourly-4,daily-4) pins:velero-pin 2026-07-02 01:01:28 EDT k02b83aeb36ce7414e2254a73a0cd6b6a 650 MB dgrwxrwxr-x files:5789 dirs:605 (latest-3,hourly-3,daily-3) pins:velero-pin 2026-07-03 01:01:24 EDT ke4c31416fabc7c9c1beb77589a7bdab4 650 MB dgrwxrwxr-x files:5789 dirs:605 (latest-2,hourly-2,daily-2) pins:velero-pin 2026-07-04 01:01:19 EDT k7b05e57d2c2835e44c9ab9694c1da628 650 MB dgrwxrwxr-x files:5789 dirs:605 (latest-1,hourly-1,daily-1,weekly-1,monthly-1,annual-1) pins:velero-pin(this is a different repository/for a different namespace, but the missing one above with b00a.. was also found with this method).
I now have a copy of the backup I want locally 😅 .
But at this point, I'm struggling to figure out how to get a tarball back into velero, hence the opening question!
Thanks for your help!
All reactions