From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 99DA915815E for ; Sun, 11 Feb 2024 02:15:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D11CCE2A94; Sun, 11 Feb 2024 02:15:15 +0000 (UTC) Received: from m4.out4.mxs.au (m4.out4.mxs.au [110.232.143.188]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40DF5E2A8A for ; Sun, 11 Feb 2024 02:15:14 +0000 (UTC) Received: from fe.s1.ax.email (fe.s1.ax.email [110.232.143.205]) by out4.mxs.au (Halon) with ESMTPS (TLSv1.3) tls TLS_AES_256_GCM_SHA384 id 5ca96c8c-c883-11ee-8d83-00163c87da3f for ; Sun, 11 Feb 2024 13:15:01 +1100 (AEDT) Authentication-Results: fe.s1.ax.email; dkim=pass header.d=kenworthy.id.au header.b="uVQuVQWx" Received: from be4.s3.ax.email (10.40.10.219) by fe.s1.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 334EA4; Sun, 11 Feb 2024 13:15:01 +1100 DKIM-Signature: v=1; a=rsa-sha256; d=kenworthy.id.au; s=axigen; c=relaxed/relaxed; q=dns/txt; h=from:date:to:cc:message-id:subject; bh=/PLlbehRcrr30jQmGJh8wFF4mBIsfyvwa1zeqsI2O30=; b=uVQuVQWxjcRgwFJj2s4/b33+PgPbG5q10ED57PSjZzgNvoo1PIrMEInDtuWQLo7WXL4cAfcd9t/BSrLqJmvUfMTZfq/7gVKHhyNzOMpq2a6OSzMQtn6hufiev29XU9zhrcyR3iAvHeNeeZM8B1gV8l7VxCCKRedTZyR+2ySzMhB8c/GYIa7e9TGp/8aDwnYT0ca79PbEDCit3xBeojo6BsQXWG97EOJyZhVIkE1IZrWUG80seKdB60iR3ZXPlCcCi0t5FVDHmga6dRKWoKRxZgc+qGarYTv1x9J5Wp+v0Ds5AYWT1lLBYjmV3Nne1plspSoANEqGZwZKshK/z6HzVw==; Authentication-Results: be4.s3.ax.email; dkim=none Authentication-Results: be4.s3.ax.email; spf=pass smtp.mailfrom=bill@kenworthy.id.au Received: from fe.s2.ax.email (10.40.10.210) by be4.s3.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 0675C7; Sun, 11 Feb 2024 13:15:01 +1100 Authentication-Results: fe.s2.ax.email; dkim=none Received: from mail.infra.localdomain (10.40.10.201) by fe.s2.ax.email (Axigen) with (ECDHE-RSA-AES128-GCM-SHA256 encrypted) ESMTPSA id 3CDB31; Sun, 11 Feb 2024 13:15:01 +1100 Received: from localhost (mail.infra.localdomain [127.0.0.1]) by mail.infra.localdomain (Postfix) with ESMTP id 6C41F18B6E81DC for ; Sun, 11 Feb 2024 10:15:00 +0800 (AWST) X-Virus-Scanned: amavisd-new at localdomain Received: from mail.infra.localdomain ([127.0.0.1]) by localhost (mail.infra.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LNvGn9UiNq80 for ; Sun, 11 Feb 2024 10:14:53 +0800 (AWST) Message-ID: Date: Sun, 11 Feb 2024 10:14:49 +0800 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [gentoo-user] Don't be like stupid me! Content-Language: en-AU, en-US To: gentoo-user@lists.gentoo.org References: From: William Kenworthy Organization: me@home In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit DomainKey-Status: no signature DKIM-Status: good Received-SPF: X-AXIGEN-DK-Result: No records X-AXIGEN-DKIM-Result: Ok X-Archives-Salt: 660631d1-7171-403a-8e4e-de6b71446a44 X-Archives-Hash: 4e07114c0cf8cd5384b65866d2f79625 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