From nobody Sat Apr 16 21:05:14 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 DAFCECFD5FE for ; Sat, 16 Apr 2022 21:05:24 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 4Kgm1b72v0z3Qfb for ; Sat, 16 Apr 2022 21:05:23 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-wr1-x431.google.com with SMTP id w4so14362825wrg.12 for ; Sat, 16 Apr 2022 14:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=w2w9YrU/PESDLtut5/qIkwwsqbsnEbhLfRn9M6bd+ug=; b=qm18JRAsMZ0BMOcnpDuEkI9Po/11+vFfUP/0+IdrIAkukPuz8YmskE0WRQyTMNNaGo 6ow5ViYge/RnJVWl5ou+DGXahVceBJBHEmcBQrVskjbuhdSk76OZMajHQhpR6tE6/xeW JKPyZg+nhI4BZu6cLh/INqYoyqqiyG7MV+HAzj4aW5RbTXHoHGwyB6iCylJLanTPEhUH qRERW8f4OgGy3Ojlj4tIGvSN9+7xIiB7rV5KCx767+PgTQdXT2gxmTYKBtpA2hGwphQd yjvYQ4qtTv2bqfTMBdmDZYx3shg/TXXhNB6Uoz0aBOVz0H+6z3XQDCr9bz3x3oQ8atOI /AmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=w2w9YrU/PESDLtut5/qIkwwsqbsnEbhLfRn9M6bd+ug=; b=qrvxAQ8uVLD4BGFCd56py10FVcDJYgow0RWaP/1RTCR+P/qqgxcUQNvU1p92ysC8bI /I6JJMMZ7LeK7YMeDUOOB1DwhjAMoTBKycSeWU+HgcTi5butkaUDrmjHZI8vltKP0E/p 5H6g29dislRb2AocPuWMb01+uxJZRT637+b1xSVG8mSNVDflkUWzL9eHACdXjZAakK4X WYaffifEqD12cq3kvFx5nYgZv1za4gG55sxPILCowzLRhWpm1M1uQTJ2hhRq/+bhfKlL 2Kc4uZszHWnFp/M75rSe07/aSxfomQmg7LcRdJBBeP5JCfZWHMUX6boFtIewaxgILxc0 jCKQ== X-Gm-Message-State: AOAM533VLXYlPjoXT77b6iqkgEGEhx3Ij5RYjsGYHb+3VgJLriWT4L2x HSBCgoohKw1qDYxlqahvAgYA/NlLigQ= X-Google-Smtp-Source: ABdhPJzV3HuM4mzC387PUJRZMMO2xduAR8hR7yNPe3k3Lrcg6R4Hhb1e84qOfa1WqhXhmKJJSiP26A== X-Received: by 2002:adf:9129:0:b0:207:b1e3:4b66 with SMTP id j38-20020adf9129000000b00207b1e34b66mr3293539wrj.608.1650143116393; Sat, 16 Apr 2022 14:05:16 -0700 (PDT) Received: from smtpclient.apple ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id k124-20020a1ca182000000b0038eb706c030sm11628256wme.39.2022.04.16.14.05.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Apr 2022 14:05:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?Q?S=C3=B8ren_Schmidt?= 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 (1.0) Subject: Re: recover deleted file Date: Sat, 16 Apr 2022 23:05:14 +0200 Message-Id: References: Cc: "Julian H. Stacey" , Sami Halabi , FreeBSD Current In-Reply-To: To: Weldon Godfrey X-Mailer: iPhone Mail (19E258) X-Rspamd-Queue-Id: 4Kgm1b72v0z3Qfb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=qm18JRAs; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sorenschmidt@gmail.com designates 2a00:1450:4864:20::431 as permitted sender) smtp.mailfrom=sorenschmidt@gmail.com X-Spamd-Result: default: False [-2.66 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.998]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.83)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::431:from]; MLMMJ_DEST(0.00)[freebsd-current]; FREEMAIL_CC(0.00)[berklix.com,gmail.com,freebsd.org]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Just replace rm with a script that moves files to a trash folder, then eithe= r clean that automagically after some period of time or handle it manually. Doesn=E2=80=99t have to be complicated=E2=80=A6 -S=C3=B8ren > On 16 Apr 2022, at 21.08, Weldon Godfrey wrote: >=20 > =EF=BB=BF >=20 >> On Apr 16, 2022, at 12:27 PM, Julian H. Stacey wrote: >>=20 >> =EF=BB=BF >>>=20 >>> okay... >>> all seems very time consuming operations!! >>=20 >> Yes >>=20 >>> There should be an os "undelete" as happens in NTFS for example.. which i= s >>> very fast and can be done also with extra tools without a hassle. >>=20 >> A WIBNI (Wouldnt It Be Nice If) for Unix FS's for as long as I can rememb= er >> (decades) but no one's ever done it.=20 >>=20 >> Ways to get it done: >> Get it listed as a Google Summer Of Code project for FreeBSD, Or >>=20 >> Get your employer to help pay for it, eg chip in with other BSD >> user companies to pay some money to FreeBSD Foundation, & get >> them to pay for it to be developed. >>=20 >> Or hire are an individual freelance BSD Consultant to do it, >> There's a global index here http://berklix.com/consultants/ >>=20 >> & a mail list that's moderated jobs@freebsd >>=20 >> Some author(s) of BSD FFS are on list fs@, Kirk is one name springs >> to mind ? Some freelancers on fs@ I recall. >>=20 >> IMO Would be a fun job if funded :-) >>=20 >>>=20 >>> for now I got backup from last day .. caused me a lot of troubles, not s= ay >>> legal ones, but I passed the point to hold the machine down. >>>=20 >>> any advice? >>>=20 >>> 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 an= y >>> other configurable sysctl) and allow to recover quickly or "force delete= / >>> empty recycle bin" , rather than delete and give back space immediately f= or >>> use and destroy possibility to restore. >>>=20 >>> my 2 cents. >>>=20 >>> Sami >>=20 >>=20 >=20 > or just use ZFS filesystem and leverage regular snapshots. I wrote a scr= ipt that manages snapshots (moves to weekly, monthly and deletes snaps) but i= believe there is a utility in the ports collection that will do the automat= ed management.=20 >=20 >=20 >>=20 >=20