From nobody Sat Apr 16 15:01:54 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 21FBA5D7FC2 for ; Sat, 16 Apr 2022 15:02:12 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KgbyW2tplz3Pm9 for ; Sat, 16 Apr 2022 15:02:11 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: by mail-qt1-x831.google.com with SMTP id cp8so4564267qtb.6 for ; Sat, 16 Apr 2022 08:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2fOSkGnFiOG/7wsXq/x8J+iXsFc8rezlfctvmdTX1IM=; b=NVlcvzxUBH6INZ+OI8bApxz6kdNc9b3E3kOi6g6MJqX2cz+oXfxKxv4Fzumv6YIKgZ h7hpVexQa9eNlgZ34ftPu9Wu3lohFfdBnazBkqJOnsCrCCJmr9poZvjnebrTGdXtKcxA jDxxus9wrU6XjKDWqnJm0NIZO30oDLMbm9f0YjwYcKYeDwZKVPHSYIDP7wEO7HcYC3FV 2FgVJClCzmDKCuVQ32zo/WE/E6oqQNUf+EJ640qbQHW1Dgz7uMoe2r0D/OFD1avWzwmt W0L/2iGYVvyS/FWWlT6qSn5s1tNukKn2QmSqZwm3glMiT9r8RzfBsqKuYq9v4xP+LlQ0 yMhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2fOSkGnFiOG/7wsXq/x8J+iXsFc8rezlfctvmdTX1IM=; b=n5Ys2BL9Oh1Wmhkz3ziQcxQlHbCET1efgACbLFnZe4guHl0aIvR3k+BPrXSUBWlmzq xRCR50fSoc/C2e3qc2AtOHKEqvAbEO9zBKLZInlgq7JiQSAs6qBo1JPmchVzHdZKksKO UnKrA28XjXwPGXJrfCul/XPbNfG8uw2wtoNYXzrBdIAeZ7rQtgW4yYe/eAh8imVqKI7F HmsFAuauQA+ToOm/tbt7QVOGdy7a9S/z74t3sDhe5VfyQarI2MF7UlPinLRGhMyjh5SK FQreGhAY56vRG2bJ5rzFjyVxSmdZMQceRFF4tD3RTfRmuLaxIH5IuCEQNJH46A4mvEVZ T+kA== X-Gm-Message-State: AOAM5304kHNRRCVKwpExgckzjUlMiQUkBBvFvPnJCNDaTE5sqEhBv4L/ QM28imW4jbmntIDl0WPkEaIPx++wUprMvC/M1cnTRYE2 X-Google-Smtp-Source: ABdhPJxsIBpPfDmtji0eQNFGhnUEHI3moiTIcJ+fwvnTDL2MugyB5q2UeAgyMnX6pDiFb5tWaTfkXk8OdrWMFl7kezQ= X-Received: by 2002:ac8:4e39:0:b0:2f1:e3f1:2b57 with SMTP id d25-20020ac84e39000000b002f1e3f12b57mr2462770qtw.306.1650121325325; Sat, 16 Apr 2022 08:02:05 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <202204161248.23GCmlIP044778@fire.js.berklix.net> <202204161423.23GENCra046094@fire.js.berklix.net> In-Reply-To: <202204161423.23GENCra046094@fire.js.berklix.net> From: Sami Halabi Date: Sat, 16 Apr 2022 18:01:54 +0300 Message-ID: Subject: Re: recover deleted file To: "Julian H. Stacey" Cc: FreeBSD Current Content-Type: multipart/alternative; boundary="0000000000006eafca05dcc6cf36" X-Rspamd-Queue-Id: 4KgbyW2tplz3Pm9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=NVlcvzxU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sodynet1@gmail.com designates 2607:f8b0:4864:20::831 as permitted sender) smtp.mailfrom=sodynet1@gmail.com X-Spamd-Result: default: False [-0.81 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(0.19)[0.191]; NEURAL_SPAM_SHORT(1.00)[0.998]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::831:from]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N --0000000000006eafca05dcc6cf36 Content-Type: text/plain; charset="UTF-8" okay... all seems very time consuming operations!! There should be an os "undelete" as happens in NTFS for example.. which is very fast and can be done also with extra tools without a hassle. for now I got backup from last day .. caused me a lot of troubles, not say legal ones, but I passed the point to hold the machine down. any advice? Maybe UFS developer would do a rework so latest deleted inodes would put in a "recycle bin" (maybe with a sysctl or whatever) for say one day (or any other configurable sysctl) and allow to recover quickly or "force delete / empty recycle bin" , rather than delete and give back space immediately for use and destroy possibility to restore. my 2 cents. Sami On Sat, Apr 16, 2022 at 5:23 PM Julian H. Stacey wrote: > > Then I would reboot single user, > > fsck & mount only the partitions the data was Not on., > > dd the partition to recover, > > then fsck the partition & mount it, & go multi user, > > then I'd make a 2nd copy of the partition with data to recover > > Oops. I meant: > > ...... I'd make a 2nd copy (with cp) from the 1st image file, > not of course Not a copy of raw decice partition after fsck > has discarded blocks. > > The spare 2nd. copy because I've zapped data too often, trying to rescue > it, while fumbling with unfamiliar resue tools: its easier to > have a play image one can experimentaly try to recover from, & > periodicaly while one learns, & that gets in a mess, one can refresh > copy from master to experimental copy. > > If any recovery tools want to run on devices, & refuse images in files, use > mdconfig -a -t vnode -f imagefile > > I recall FS has journals etc, > Specalists on list fs@ > > Cheers, > -- > Julian Stacey http://berklix.com/jhs/ http://StolenVotes.UK > Kill / remove Putin to stop him killing & provoking world war. > -- Sami Halabi Information Systems Engineer NMS Projects Expert, FreeBSD SysAdmin Expert Asterisk Expert --0000000000006eafca05dcc6cf36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
okay...
all seems very time consuming opera= tions!!

There should be an os "undelete"= as happens in NTFS for example.. which=C2=A0is very fast and can be done a= lso with extra tools without a hassle.

for now I g= ot backup from last day .. caused me a lot of troubles, not say legal ones,= but I passed the point to hold the machine down.

= any advice?

Maybe UFS developer would do a rework = so latest deleted inodes would put in a "recycle bin" (maybe with= a sysctl or whatever) for say one day (or any other configurable sysctl) a= nd allow to recover quickly or "force delete / empty recycle bin"= , rather=C2=A0than delete and give back space immediately=C2=A0for use and= destroy possibility to restore.

my 2 cents.
=

Sami



On Sat, Apr 16,= 2022 at 5:23 PM Julian H. Stacey <jh= s@berklix.com> wrote:
> Then I would reboot single user,
> fsck & mount only the partitions the data was Not on.,
> dd the partition to recover,
> then fsck the partition & mount it, & go multi user,
> then I'd make a 2nd copy of the partition with data to recover

Oops. I meant:

...... I'd make a 2nd copy (with cp) from the 1st image file,
=C2=A0 =C2=A0 =C2=A0 =C2=A0not of course Not a copy of raw decice partition= after fsck
=C2=A0 =C2=A0 =C2=A0 =C2=A0has discarded blocks.

The spare 2nd. copy because I've zapped data too often, trying to rescu= e
it, while fumbling with unfamiliar resue tools: its easier to
have a play image one can experimentaly try to recover from, &
periodicaly while one learns, & that gets in a mess,=C2=A0 one can refr= esh
copy from master to experimental copy.

If any recovery tools want to run on devices, & refuse images in files,= use
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mdconfig -a -t vnode -f imagefile

I recall FS has journals etc,
Specalists on list fs@

Cheers,
--
Julian Stacey=C2=A0 http://berklix.com/jhs/ http://StolenVotes.UK=C2=A0 <= br> Kill / remove Putin to stop him killing & provoking world war.


--
Sami Hala= bi
Information Systems Engineer
NMS Projects Expert,=C2=A0FreeBSD SysAdmin Expert
Aste= risk Expert
--0000000000006eafca05dcc6cf36--