Re: recover deleted file

From: Søren_Schmidt <soren.schmidt_at_gmail.com>
Date: Sat, 16 Apr 2022 21:05:14 UTC
Just replace rm with a script that moves files to a trash folder, then either clean that automagically after some period of time or handle it manually.
Doesn’t have to be complicated…

-Søren


> On 16 Apr 2022, at 21.08, Weldon Godfrey <weldon@excelsus.com> wrote:
> 
> 
> 
>> On Apr 16, 2022, at 12:27 PM, Julian H. Stacey <jhs@berklix.com> wrote:
>> 
>> 
>>> 
>>> okay...
>>> all seems very time consuming operations!!
>> 
>> Yes
>> 
>>> 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.
>> 
>> A WIBNI (Wouldnt It Be Nice If) for Unix FS's for as long as I can remember
>> (decades) but no one's ever done it. 
>> 
>> Ways to get it done:
>> Get it listed as a Google Summer Of Code project for FreeBSD, Or
>> 
>> 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.
>> 
>> Or hire are an individual freelance BSD Consultant to do it,
>>   There's a global index here http://berklix.com/consultants/
>> 
>> & a mail list that's moderated jobs@freebsd
>> 
>> Some author(s) of BSD FFS are on list fs@, Kirk is one name springs
>> to mind ? Some freelancers on fs@ I recall.
>> 
>> IMO Would be a fun job if funded :-)
>> 
>>> 
>>> 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
>> 
>> 
> 
> or just use ZFS filesystem and leverage regular snapshots.   I wrote a script 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 automated management. 
> 
> 
>> 
>