rm -r my home folder....

Plessek

New Member
Joined
Apr 17, 2020
Messages
3
Reaction score
3
Credits
0
In 12 years using ubuntu I never did something stupid like this:
It started that my trash bin did not work any more.
I found an instruction how to repair it:
sudo bash
cd ~/.local/share/trash
rm -r *.*


I was working and did bash copy paste it into terminal (on left monitor while I was working in the middle...) hit several times enter and it happened:
I believe there was something wrong with the folder... so the terminal did not enter it... I rm -r *.* my entire home folder....

It was because I did not even took care what I was doing...
I rebooted in live USB - made a image from the harddisk containing home...

I found http://extundelete.sourceforge.net/ to recover del files... but I am still unsure...,
I did a backup of most files 2 weeks ago - but that does not include all the settings.
Any succestions how to proceed whould be highly appreciated....
 


When you used the undelete tool, did you also undelete your hidden folders/files?
 
I did not use extundel yet...
I am still unsure how to use it. Until now I only use it on single files. Tomorrow I will give it a try.
 
We will be interested to know how all that goes.....best of luck to you.

For the future, have a look at Timeshift

It works in a similar way to windows system restore....except that Timeshift actually works....It has saved me several times
It is not as complicated as it looks
Install it
Have an external hard drive ready to send the saved snapshots to
Set it up via settings to take a snapshot once a wee/two weeks/month or whatever suits you....and then arrange the place it send those snapshots to.......to be the external hard drive.

Straightforward.....and it will save you should this ever happen again
 
Yes, a backup process will always save your - self.

Timeshift is alright, but it's not intended as a backup system. It's a recovery system, and works best for rolling back point in time changes.

Any of the rsync-based backups will work just fine.

I use rsync with a weekly plan using a rotating set of 4 USB hard drives.

Any backup plan will work, as long as you take the time to make it work.
 
I found out that extundel is abandoned.

ext4magic did the job.

sudo ext4magic /dev/sdb1 -M -d /mnt/FREE_SPACE



Great tool!!
Restored everything including the paths...

If someone knows what he does - it is done in 10 min.
For me as a "copy paste" terminal user (what brought me into that situation in the first place) it took me some hours to read some tutorials...

I think next step is to buy 4 USB hard drives...and take a look into timeshift.

Keep healthy....
 
one reason to make sure you install a distro with Ext4 file system. Can't remember if i installed it but just booted my knoppix 8.6 on usb and ext4magic is available.
 
Last edited:
..and take a look into timeshift.

0cd7RxV.gif


(wizard appears in a puff of smoke)

g'day @Plessek and welcome to linux.org - glad to see you solved it, phew!! :)

on timeshift, my thread here may be of use

https://www.linux.org/threads/timeshift-similar-solutions-safeguard-recover-your-linux.15241/

and also Linux Lite, who, like Linux Mint ship their product with TS installed, have a good simple tute here

https://www.linuxliteos.com/manual/tutorials.html#timeshift

as @jglen490 has said above, this is not per se a standard backup utility, but it can be effectively used as same, once you become aware of how it works.

i include my home folder with the snapshots it takes, to maintain my settings, but folders for docs, vids, pictures i store off drive.

if you have questions on how to work your home folder into the plan, ask over at my thread.

cheers

chris turner
wizardfromoz
 

Staff online


Latest posts

Top