Score:-1

Xubuntu accidentally erased all files

gm flag
net

I'm using a xubuntu 22.04 updated from 18.04.

All of a sudden, all the files and directories I had vanished. Only files with root permission survived. Even my /var/www/ has been completely erased.

All the installed software is still there, but xubuntu automatically reverted to default theme and settings.

I don't have many hopes to restore my files: the trash appears to be empty and the HD space full. However, I would like to understand what happened.

Any hint for a diagnostic procedure?

Thanks

EDIT:

    lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /snap/chromium/2465
loop1
     squash 4.0                                                    0   100% /snap/chromium/2477
loop2
     squash 4.0                                                    0   100% /snap/bare/5
loop3
     squash 4.0                                                    0   100% /snap/core/14784
loop4
     squash 4.0                                                    0   100% /snap/core/14946
loop5
     squash 4.0                                                    0   100% /snap/core18/2745
loop6
     squash 4.0                                                    0   100% /snap/core18/2751
loop7
     squash 4.0                                                    0   100% /snap/core20/1879
loop8
     squash 4.0                                                    0   100% /snap/core20/1891
loop9
     squash 4.0                                                    0   100% /snap/cups/872
loop10
     squash 4.0                                                    0   100% /snap/gnome-3-28-1804/198
loop11
     squash 4.0                                                    0   100% /snap/gnome-3-34-1804/93
loop12
     squash 4.0                                                    0   100% /snap/gnome-3-34-1804/90
loop13
     squash 4.0                                                    0   100% /snap/gnome-3-28-1804/194
loop14
     squash 4.0                                                    0   100% /snap/gnome-3-38-2004/137
loop15
     squash 4.0                                                    0   100% /snap/gnome-3-38-2004/140
loop16
     squash 4.0                                                    0   100% /snap/gtk2-common-themes/13
loop17
     squash 4.0                                                    0   100% /snap/gtk-common-themes/1534
loop18
     squash 4.0                                                    0   100% /snap/gtk-common-themes/1535
loop19
     squash 4.0                                                    0   100% /snap/modem-manager/426
loop20
     squash 4.0                                                    0   100% /snap/modem-manager/516
loop21
     squash 4.0                                                    0   100% /snap/scrcpy/399
loop22
     squash 4.0                                                    0   100% /snap/scrcpy/394
sda                                                                         
├─sda1
│    ntfs         SYSTEM_DRV
│                       A2FEE331FEE2FC83                                    
├─sda2
│    ntfs               B46E5D7D6E5D3976                                    
├─sda3
│                                                                           
├─sda4
│    ntfs         Lenovo_Recovery
│                       DE3CE11A3CE0EF09                                    
├─sda5
│    ext4   1.0         177c5b8c-c9b2-44be-8f57-4a207660b3df   89,5G    20% /
└─sda6
     swap   1           c24b1729-0a5c-43f9-b2ad-084ccf5dcda6                [SWAP]
oldfred avatar
cn flag
It does not randomly erase files. But did you have a separate /home partition. And does that partition have corruption, so not mounted on reboot. It then creates a new empty/default /home inside / (root). Post this in your question above: `lsblk -f` and `sudo fdisk -lu`
pl flag
How did you upgrade from 18.04 to 22.04? Did you do a reinstall over the top? If so, that's likely wiped your root partition which would contain `/var/www` among other important directories.
net avatar
gm flag
net
Nope, I upgraded months ago.
net avatar
gm flag
net
And nope, no separate /home partition.
Score:1
it flag

The XUbuntu operating system does not delete files independently so it is important to understand the cause.

To further investigate what happened I invite you to check the system log files that you can typically find in /var/log/syslog.

If your HDD turns out to be full but you can't see any files then it may be that during the OS upgrade something may have gone wrong, in this regard try reading the HDD from another pc (even as an external device if you wish).

Before doing these complex updates it is always good to back up the files to an external HDD. I also advise against doing an OS upgrade by skipping many versions, from 18.04 to 22.04 there are 7 versions in between and probably things changed that affected the data loss.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.