[SOLVED] Salvaging chunks from lost+found

Aug 2, 2022
10
2
8
Hi,

My filesystem went FUBAR, nuked a couple of directories, and dumped their contents in lost+found, and the files are named after their inode.
How do i generate the SHA-256 digest that the filename is generated from, so I can move them back to the correct directory.

According to the documentation the chunk contains a header and footer, and the sha-256 sum is generated from everything in between.


Happy new year,
René
 
you can use "proxmox-backup-debug inspect chunk":

Code:
$ cp /tank/pbs/.chunks/fe90/fe9059f5dbe49c9d502c3aff716cda1ebb9eb829a181d90597d8ba6dc2a8b78a /tmp/chunk

$ proxmox-backup-debug inspect chunk /tmp/chunk --use-filename-as-digest false --decode /tmp/decoded; sha256sum /tmp/decoded
CRC: "1772557324(OK)"
encryption: "none"
fe9059f5dbe49c9d502c3aff716cda1ebb9eb829a181d90597d8ba6dc2a8b78a  /tmp/decoded

replace paths accordingly ;) if your chunks are encrypted, you also need to specify the keyfile for decoding to work (the digest is based on the raw input data, not the encrypted chunk!)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!