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
if this happens first thing you do is shut down immedietely
the file isn't deleted
the space is just marked as free
yeah i havent installed anything or changed anything since
well is there an app that i can use?
but the OS still writes stuff to the drive
well
uhh
lets just hope 😅
but yeay there's an app
what's the name?
there's one called testdisk
already tried that but didnt understand how it worked, followed guides and they didnt work
it's a terminal app
yeah i know that i am using it in the terminal
its just
idk no files appear when i follow the video's guide

oh yeah bazzite uses BTRFS
so makes sense why testdisk doesn't support it
a
at least by default
soo
another app perhaps?
btrfs is newer & less common than something like EXT4
wait but
the drive i am trying to use testdisk on uses ext4
ext4 should definitely be supported
also since it's presumably an external drive you're probably safer
yep
not my main drive
since the OS won't write random stuff to it
but for some reason testdisk says that
are you using the version from the website?
i used homebrew
https://www.cgsecurity.org/wiki/Download_TestDisk
could try the website version
CGSecurity
Download TestDisk
TestDisk & PhotoRec
Per essere informato sulle nuove release, abbonati qui
Documentazione in linea: TestDisk, PhotoRec
uhhh
how do i use it 💀
if you downloaded the x64 Linux version
extract it somewhere & run testdisk_static in the terminal
oh okay i see files now
but not deleted ones
what file type was the file?
it was a folder
oh
did you unmount the drive
do that to be safe
okay
its unmounted now
that should make 100% sure nothing happens to it
ext4 haas a journal thingy
uhhh how do i access that?
man is there no easy way to just recover files with like a gui app?
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
sooo what do i do
first we have to know the name of the partition you wanna dump the journal for
the partition name like the one i gave it?
if so its this one
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

ok good
the mounted from is the device
alrighty
sudo debugfs -R "dump <8> ~/NVME.journal" /dev/nvme0n1p1 this should dump ituhhh
you should get NVME.journal in your home folder
thats not good right?

hmm
you might need to create the file beforehand
wdym?
oh my bad i got it
you gotta specify an absolute path for the file to dump into
aaaand how do i do that?
sudo debugfs -R "dump <8> /tmp/NVME.journal" /dev/nvme0n1p1
this one should work
alr its done now right?
should be
and where do i go?
the file should now be in
/tmp
nowthat?

yup
it's there now
double clicking it does nothing
am i supposed to do something else?
yes something else
which is?
getting the ext4magic tool telling it to read the journal & undelete the files based off it
next thing is getting
ext4magicand do i install it off a website or the terminal?
if homebrew can get it that should be good

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
i did figure out a simple way to get ext4magic
but it's fine if you're sleepy
yeah lets continue this later
we can continue whenever
as long as the data doesn't get overwritten
of course
again thanks for the help