this post was submitted on 10 Jul 2023
19 points (95.2% liked)

Linux

48209 readers
729 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

-=See edit at bottom=-

I was trying to set up a family member up with Linux as a windows replacement. I installed MX Linux xfce on their laptop with separate "/" and "/home" partitions.

Through a comedy of errors, the following occurred:

  • On day one, Timeshift was configured to take weekly snapshots of the system files AND their user home folder.
  • The initial timeshift snapshot was begun, and then cancelled when they discovered that home files aren't the intended target, but they noticed growing snapshot files, indicating the cancelation wasn't complete.
  • NCDU was used to remove the files in /home/timeshift
  • The family member's only copies of three days of paid work in a writing program called Bibisco (Java app) disappeared after reboot

The system was rebooted twice before the cause was discovered and shutdown with minimal (5min) use.

I've never done any ext4 data recovery, but the tools in Kali seem geared toward common and known filetypes (pdf, jpg, etc).

Should I be looking to restore the timeshift files, or the writing documents (with .bibisco2 file extensions)?

Is this a lost cause?

Edit: Thank you everyone for your helpful comments. In the end, time was against us and the choice was made to reinstall. After I realized the document files are just json, I looked in three Kali carving apps and the photorec app, and there were no files to recover. The freah install now has eclone set up to push regular updates from the bibisco folder to the cloud. Lesson learned.

top 13 comments
sorted by: hot top controversial new old
[–] metarmask@sh.itjust.works 5 points 1 year ago (1 children)

.bibisco2 are really just zip files which PhotoRec can find, if you want to use that. Good luck.

[–] s38b35M5@lemmy.world 3 points 1 year ago (1 children)

It seems the files were all living in a timeshift snapshot file, as photorec/testdisk showed no deleted files, and a few deleted empty folders in the /home/timeshift folder. I think this is just a painful lesson that we'll move on from.

[–] mvirts@lemmy.world 2 points 1 year ago (1 children)

How full is the home partition? I'm surprised the files didn't show up in testdisk. Sometimes files show up in the incorrect folder in testdisk after being deleted

[–] s38b35M5@lemmy.world 1 points 1 year ago (1 children)

This system was built last Thursday and had about 204GB of 220GB free.

Sorry for the delay in reply. I was unable to edit my post or make comments for a chunk of the day yesterday.

[–] mvirts@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

No worries 😁 lol I've been kind of obsessing over this issue, reading timeshift's code and stuff. Timeshift uses rsync under the hood to do file copying when not in btrfs mode, which uses the delete excluded option to keep excluded files out of snapshots. I was not able to determine if a cancelled snapshot would be rolled back with rsync going the other way, but it would be a major timeshift bug to delete excluded files on restore so I doubt that happened.

Timeshift dos say that it has rsync create hard links for local snapshots on the same fs, so that could complicate matters. even though ncdu supports hard links and not double counting them, I tested deleting hard linked files and it only deletes the file entry from one folder even though it's aware that the file is used in another folder in the tree.

With that much free space you're almost guaranteed that the files are still there, even after a rebuild. Idk if you want to get more in depth let me know

[–] jakoma02@czech-lemmy.eu 3 points 1 year ago (2 children)

Give testdisk a go, see for example this tutorial. It is a terminal utility, so it might take some time to get used to it. But no one can guarantee that it will successfully recover anything, the deleted files stay on the disk only as long as they are not overwritten.

Do you have any idea why the files disappeared after reboot? One thing that comes to mind is that they might have been saved in /tmp, in that case I believe recovery would not be possible.

Regarding to which files you should recover, try all of them and see if you have any luck.

Good luck with recovering the files!

[–] mvirts@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

I highly recommend testdisk, but definitely shut down the machine and use another disk (USB drive?) To boot and avoid mounting the disk that may have your files at all. mount read only if you have to. Save the recovered files to a different drive as well, which can be the same USB drive you're using for recovery. If testdisk doesn't show the files (in my experience, for drives that have significant free space they will almost certainly be there) you could try photorec, the companion app that does signature based file searches.

[–] s38b35M5@lemmy.world 1 points 1 year ago (1 children)

Do you have any idea why the files disappeared after reboot?

I suspect the files were actually in a timeshift snapshot, so when those files were deleted, so were the files.

I'll give your links a thorough read, thanks!

[–] jakoma02@czech-lemmy.eu 1 points 1 year ago (1 children)

From my understanding, files cannot be directly stored only in a timeshift snapshot -- they must be first stored on the disk and only then timeshift can make a backup inside the snapshot. But I have never used timeshift myself, maybe I just completely misunderstand how it works.

[–] s38b35M5@lemmy.world 1 points 1 year ago

Deleting the snapshot files lost considerable data including all files created after the aborted snapshot. The reboot that initially uncovered the problem led to a boot in "basic" xfce, and searching for the work files in read only mode from live boot shows no files/folders created in /home/username after the snapshot. It seems to have behaved like a VMware snapshot that had files living in the snapshot.

[–] metarmask@sh.itjust.works 2 points 1 year ago* (last edited 1 year ago) (1 children)

Bibisco2 is a JavaScript app, unlike version 1. It seems .bibisco2 files are only created when exported, otherwise it's in a database somewhere. You can add custom formats in recovery tools like TestDisk and Photorec. I could look around and see if the database or the bibisco2 export files have a header, which I think is required to add a format.

Edit: Nevermind, there's a paid version which creates bibisco2 files automatically.

[–] s38b35M5@lemmy.world 2 points 1 year ago

Yes, the paid version (in use here) can create those bibisco2 files, though only the auto-save backups are by default. As you said, by default, the work is in a type of database format with a gibberish GUID-like naming convention.

It's the auto-save files we're after.

I'm getting setup with an external drive large enough to write recovered files to, but I don't like my odds at discerning how to add custom formats based on headers. I'll watch some tutorials and see what I make of it.

Thanks for your comment!!!

[–] bankimu@lemm.ee 1 points 1 year ago

Where were the .bibisco2 files stored before they vanished?

load more comments
view more: next ›