Had a timeshift accident, lost my home folder

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
p38
Level 1
Level 1
Posts: 3
Joined: Sun Nov 27, 2022 11:51 pm

Had a timeshift accident, lost my home folder

Post by p38 »

I did something really dumb. Hopefully there is a way out of the big mess I created.

I was trying out timeshift for the first time. I picked the /home partition to store the backup and kicked it off. There was about 60GB free in /home at the beginning, and after a bit the backup ran out of space. Seeing /run/timeshift/backup mentioned in the log file, I thought I'll just go delete that folder and get the 60GB back. Well, not a good idea! Apparently it contained links to /home and I deleted everything in /home. :cry:

Is there a way to undelete my files?
Last edited by LockBot on Sun May 28, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kato181
Level 9
Level 9
Posts: 2577
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: Had a timeshift accident, lost my home folder

Post by kato181 »

Hi p28. Welcome to the forum.
Please read the form rules with regards to Sect 5. Information is required of the system you are using, in terminal copy & paste the following command and post the results back here in between the code display brackets 5th icon above the text box.

Code: Select all

inxi -Fxz
It is always best to save your timeshift snap shot to either another drive or an external drive, that way you won't waste space on the boot drive.
Try booting into a live session usb and start timeshift from there and point it to where you had it save the snap shots, you can only delete the snap shots using timeshift or by booting into a live session usb.
It is always best to read up on what software before using it, saves a lot of problems later on.
You could try using Gddrescue or TestDisk from the software manager.
p38
Level 1
Level 1
Posts: 3
Joined: Sun Nov 27, 2022 11:51 pm

Re: Had a timeshift accident, lost my home folder

Post by p38 »

Hi kato181,

Sorry about that, I didn't know about the rules. I attached the inxi output.

Within timeshift it didn't show that any snapshots existed, I guess because it ran out of room and didn't finish. That's why I got careless and made a big mistake. Learned that lesson the hard way.

I read a bit about testdisk, and also extundelete and ext4magic. I think one of them should be able to help me recover.

Code: Select all

System:
  Kernel: 5.4.0-132-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 
  Desktop: Cinnamon 4.8.6 Distro: Linux Mint 20.1 Ulyssa 
  base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: TOSHIBA product: Satellite P870 v: PSPLEU-08L007 
  serial: <filter> 
  Mobo: TOSHIBA model: Portable PC v: MP serial: <filter> UEFI: Insyde 
  v: 6.30 date: 01/17/2013 
Battery:
  ID-1: BAT0 charge: 0.0 Wh condition: N/A model: N/A status: Unknown 
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard PID:0055 
  charge: 5% (should be ignored) status: Discharging 
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse PID:003f 
  charge: 70% (should be ignored) status: Discharging 
CPU:
  Topology: Quad Core model: Intel Core i7-3630QM bits: 64 type: MT MCP 
  arch: Ivy Bridge rev: 9 L2 cache: 6144 KiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38313 
  Speed: 1197 MHz min/max: 1200/3400 MHz Core speeds (MHz): 1: 1197 2: 1197 
  3: 1197 4: 1197 5: 1197 6: 1200 7: 1198 8: 1197 
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Toshiba 
  driver: i915 v: kernel bus ID: 00:02.0 
  Display: x11 server: X.Org 1.20.13 driver: modesetting 
  unloaded: fbdev,vesa resolution: 1920x1200~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) 
  v: 4.2 Mesa 21.2.6 direct render: Yes 
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Toshiba 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: Native Instruments Komplete Audio 6 type: USB 
  driver: snd-usb-audio bus ID: 3-2:5 
  Sound Server: ALSA v: k5.4.0-132-generic 
Network:
  Device-1: Qualcomm Atheros AR8162 Fast Ethernet vendor: Toshiba 
  driver: alx v: kernel port: 2000 bus ID: 01:00.0 
  IF: enp1s0 state: down mac: <filter> 
  Device-2: Intel Centrino Wireless-N 2230 driver: iwlwifi v: kernel 
  port: 2000 bus ID: 02:00.0 
  IF: wlp2s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 931.51 GiB used: 62.09 GiB (6.7%) 
  ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB 
Partition:
  ID-1: / size: 50.12 GiB used: 24.35 GiB (48.6%) fs: ext4 dev: /dev/sda5 
  ID-2: /home size: 743.03 GiB used: 37.58 GiB (5.1%) fs: ext4 
  dev: /dev/sda6 
  ID-3: swap-1 size: 7.63 GiB used: 74.8 MiB (1.0%) fs: swap dev: /dev/sda8 
Sensors:
  System Temperatures: cpu: 54.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 291 Uptime: 14h 02m Memory: 15.52 GiB used: 4.02 GiB (25.9%) 
  Init: systemd runlevel: 5 Compilers: gcc: 9.4.0 Shell: bash v: 5.0.17 
  inxi: 3.0.38 
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Had a timeshift accident, lost my home folder

Post by mikeflan »

I thought I'll just go delete that folder
How did you delete? With the rm command?
p38
Level 1
Level 1
Posts: 3
Joined: Sun Nov 27, 2022 11:51 pm

Re: Had a timeshift accident, lost my home folder

Post by p38 »

Yes. I went into a subfolder under /run/timeshift, I forget if it was called backup or a numbered folder, and then did a rm -r. Most destructive command ever.
Locked

Return to “Software & Applications”