can i recover deleted files in bazzite?

accidentally deleted files "shift+del" and i realized i deleted an important one, is there a way to recover it?
70 Replies
nagito || Knight of Emilia
if this happens first thing you do is shut down immedietely the file isn't deleted the space is just marked as free
sheesh
sheeshOP•2mo ago
yeah i havent installed anything or changed anything since well is there an app that i can use?
nagito || Knight of Emilia
but the OS still writes stuff to the drive
sheesh
sheeshOP•2mo ago
well uhh lets just hope 😅
nagito || Knight of Emilia
but yeay there's an app
sheesh
sheeshOP•2mo ago
what's the name?
nagito || Knight of Emilia
there's one called testdisk
sheesh
sheeshOP•2mo ago
already tried that but didnt understand how it worked, followed guides and they didnt work
nagito || Knight of Emilia
it's a terminal app
sheesh
sheeshOP•2mo ago
yeah i know that i am using it in the terminal its just idk no files appear when i follow the video's guide
sheesh
sheeshOP•2mo ago
No description
nagito || Knight of Emilia
oh yeah bazzite uses BTRFS so makes sense why testdisk doesn't support it
sheesh
sheeshOP•2mo ago
a
nagito || Knight of Emilia
at least by default
sheesh
sheeshOP•2mo ago
soo another app perhaps?
nagito || Knight of Emilia
btrfs is newer & less common than something like EXT4
sheesh
sheeshOP•2mo ago
wait but the drive i am trying to use testdisk on uses ext4
nagito || Knight of Emilia
ext4 should definitely be supported also since it's presumably an external drive you're probably safer
sheesh
sheeshOP•2mo ago
yep not my main drive
nagito || Knight of Emilia
since the OS won't write random stuff to it
sheesh
sheeshOP•2mo ago
but for some reason testdisk says that
nagito || Knight of Emilia
are you using the version from the website?
sheesh
sheeshOP•2mo ago
i used homebrew
nagito || Knight of Emilia
CGSecurity
Download TestDisk
TestDisk & PhotoRec Per essere informato sulle nuove release, abbonati qui Documentazione in linea: TestDisk, PhotoRec
sheesh
sheeshOP•2mo ago
uhhh how do i use it 💀
nagito || Knight of Emilia
if you downloaded the x64 Linux version extract it somewhere & run testdisk_static in the terminal
sheesh
sheeshOP•2mo ago
oh okay i see files now but not deleted ones
nagito || Knight of Emilia
what file type was the file?
sheesh
sheeshOP•2mo ago
it was a folder
nagito || Knight of Emilia
oh did you unmount the drive do that to be safe
sheesh
sheeshOP•2mo ago
okay its unmounted now
nagito || Knight of Emilia
that should make 100% sure nothing happens to it ext4 haas a journal thingy
sheesh
sheeshOP•2mo ago
uhhh how do i access that? man is there no easy way to just recover files with like a gui app?
nagito || Knight of Emilia
the journal is a place where deletions/additions get recorded for a bit before being acted upon so if you dump the journal quickly enough an ext4magic tool cam use it to recover files i don't know of one apart from photorec which comes with testdisk
sheesh
sheeshOP•2mo ago
sooo what do i do
nagito || Knight of Emilia
first we have to know the name of the partition you wanna dump the journal for
sheesh
sheeshOP•2mo ago
the partition name like the one i gave it?
sheesh
sheeshOP•2mo ago
if so its this one
No description
nagito || Knight of Emilia
the partition has an underlying device file we need the name of that device file if you right click it & go to properties should say it there
sheesh
sheeshOP•2mo ago
No description
nagito || Knight of Emilia
ok good the mounted from is the device
sheesh
sheeshOP•2mo ago
alrighty
nagito || Knight of Emilia
sudo debugfs -R "dump <8> ~/NVME.journal" /dev/nvme0n1p1 this should dump it
sheesh
sheeshOP•2mo ago
uhhh
nagito || Knight of Emilia
you should get NVME.journal in your home folder
sheesh
sheeshOP•2mo ago
thats not good right?
No description
nagito || Knight of Emilia
hmm you might need to create the file beforehand
sheesh
sheeshOP•2mo ago
wdym?
nagito || Knight of Emilia
oh my bad i got it you gotta specify an absolute path for the file to dump into
sheesh
sheeshOP•2mo ago
aaaand how do i do that?
nagito || Knight of Emilia
sudo debugfs -R "dump <8> /tmp/NVME.journal" /dev/nvme0n1p1 this one should work
sheesh
sheeshOP•2mo ago
No description
sheesh
sheeshOP•2mo ago
alr its done now right?
nagito || Knight of Emilia
should be
sheesh
sheeshOP•2mo ago
and where do i go?
nagito || Knight of Emilia
the file should now be in /tmp now
sheesh
sheeshOP•2mo ago
that?
No description
nagito || Knight of Emilia
yup it's there now
sheesh
sheeshOP•2mo ago
double clicking it does nothing am i supposed to do something else?
nagito || Knight of Emilia
yes something else
sheesh
sheeshOP•2mo ago
which is?
nagito || Knight of Emilia
getting the ext4magic tool telling it to read the journal & undelete the files based off it next thing is getting ext4magic
sheesh
sheeshOP•2mo ago
and do i install it off a website or the terminal?
nagito || Knight of Emilia
if homebrew can get it that should be good
sheesh
sheeshOP•2mo ago
No description
sheesh
sheeshOP•2mo ago
dam well i am sleepy right now so amma go to sleep thanks for the help but seems like i am out of luck for now
nagito || Knight of Emilia
i did figure out a simple way to get ext4magic but it's fine if you're sleepy
sheesh
sheeshOP•2mo ago
yeah lets continue this later
nagito || Knight of Emilia
we can continue whenever as long as the data doesn't get overwritten of course
sheesh
sheeshOP•2mo ago
again thanks for the help

Did you find this page helpful?