Warn HN: Monarch upgrade deletes all files in $HOME
There is a neat tool for Flutter development called Monarch.
Due to the bug if you run 'monarch upgrade' it deletes all files in HOME :( https://github.com/Dropsource/monarch/issues/38
Due to the bug if you run 'monarch upgrade' it deletes all files in HOME :( https://github.com/Dropsource/monarch/issues/38
20 comments
[ 4.1 ms ] story [ 55.1 ms ] thread> The monarch upgrade command used to delete old monarch files. Under certain conditions, a bug manifested where the command could delete non-monarch files.
The releases where it can happen should be immediately yanked from wherever they can be downloaded, and their (Dropsource) social media should be filled with warnings not to run the `upgrade` command if they truly feel bad about deleting peoples most important files ($HOME compared to any other directory on disk).
Seems they have ownership of wherever it downloads the update from "https://d2dpq905ksf9xw.cloudfront.net" so they can make it fail with a error message about it being unavailable, at least to stop from more people deleting files.
@divan: maybe rename this submission to "WARN HN: $title" or something to make it more clear what is happening.
On top of everything, it's not even clear what the problem was nor what the fix was. The authors just made a new release saying "It's fixed" without showing the patch itself. Not sure if Monarch is fully open source, but after spending 10 minutes digging through sources and releases, I can't find the place where it was adjusted to not delete all files in $HOME.
Extremely frequent diff based backups? Firejails?
The latter seems a more appropriate/thorough solution, but isn't that convenient, seems mostly people use it for select programs they already slightly distrust.
I have only lost data due to hard drive failure, or at my own request (i.e formatting over what I thought I had backed up).
I recently enabled TRIM on my full-disk-encrypted SSD system. No sign of data loss yet.
I have always used ext3/ext4.
Google Drive and OneDrive has similar solutions today but they often only takes the home folder, the one we used could take a lot more.
A lot of information about Qubes talk about protection against attacks, but it's also useful against unintentional issues, and I'd argue that's a much more common case where Qubes shines.
My personal preference is to rsync to a backup host in a daily cron. Hourly for important directories. That backup host then runs rsnapshot [1] locally and the snapshots are made read-only. Important files are then backed up off-site. rsnapshot is just a perl script that creates multiple diff snapshots and uses hardlinks to save space. It is available for most distros. I believe it is also in macports and homebrew for mac.
[1] - https://wiki.archlinux.org/title/rsnapshot