From: William Kenworthy <bill@kenworthy.id.au>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Don't be like stupid me!
Date: Sun, 11 Feb 2024 10:14:49 +0800 [thread overview]
Message-ID: <ea20c3d7-9dd3-42d8-9be8-155694d8dcaf@kenworthy.id.au> (raw)
In-Reply-To: <Zcecqb700nrXVUyM@ACM>
On 10/2/24 23:56, Alan Mackenzie wrote:
> Hello, gentoo.
>
> I was wanting to do a pretty full build of my Emacs working repository.
> This involved first purging al *.elc files. The way to do this is
>
> $ find . -name '*.elc' | xargs rm
>
> . But for some reason, I typed
>
> $ find . '*.elc' | xargs rm
>
> . I even carefully checked it before pressing RET. However, press it I
> did, instantly deleting all files in my working directory. OUTCH!
>
> So, I fell back on my backup from last Sunday. After about 1½ hours
> trial and error, I had my source files as of last Sunday back again,
> though git could have been more helpful than it actually is.
>
> Thankfully, I had Emacs open, with all the files modified since Sunday
> in buffers. So, I laboriously worked through Emacs's buffer list,
> saving those ones I'd since changed.
>
> I lost all my timestamps on the files, and lost all my Emacs backup
> files (things ending in ~ which Emacs constantly makes). But my
> software builds and runs.
>
> It could have been a lot worse. Boys and girls, don't use
>
> $ find .... | xargs rm
>
> unless you really know what you're doing. And even then, it's probably
> better not to. ;-(
>
> It occurred to me fairly quickly after that press of RET that I could
> have done well with a COW snapshot facility, something which has been
> discussed at length on another recent thread. I even have LVM on my
> machine for its RAID capabilities. But I've never bothered before. I
> mean "I'm too careful", amn't I? ;-( At least I do a weekly backup,
> though.
>
> So, in the end I managed to recover fairly well, thankfully.
>
No, you don't need a snapshot system - you need a proper backup system
that stores the proper metadata. When I was experimenting with
snapshots (btrfs and moosefs) at different times I lost everything a few
times with filesystem corruption which meant I lost the snapshots too.
Snapshots are NOT safe backups - treat them as a convenient copy ...
BillK
next prev parent reply other threads:[~2024-02-11 2:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-10 15:56 [gentoo-user] Don't be like stupid me! Alan Mackenzie
2024-02-10 16:06 ` Stefan Schmiedl
2024-02-11 2:14 ` William Kenworthy [this message]
2024-02-11 10:48 ` Alan Mackenzie
2024-02-12 8:34 ` Björn Fischer
2024-02-11 18:13 ` cal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea20c3d7-9dd3-42d8-9be8-155694d8dcaf@kenworthy.id.au \
--to=bill@kenworthy.id.au \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox