chia-plotter icon indicating copy to clipboard operation
chia-plotter copied to clipboard

delete existing plot before writing new one

Open andymarden opened this issue 3 years ago • 4 comments

With the advent of portable plots and people wanting to replace their existing ones with portable ones, it would be good to be able to auto-delete a non-portable plot immediately before writing a new one.

This could be including functionality just after stage 4 or, to keep it lean, the option to run a script of your choose at this point (in which you could achieve this based on plot characteristics or file creation time)

This way, I could setoff replotting with no loss in the number of plots at any point as I go.

andymarden avatar Jul 13 '21 08:07 andymarden

I wrote a simple bash script for my own before anyone add that into the madmax plotter as a feature.

hope it helps https://gist.github.com/kanasite/2a90cbd419d5426a8ee313ffa43431c4

kanasite avatar Jul 13 '21 15:07 kanasite

I tweaked @kanasite's script to make it cron friendly, here's the gist https://gist.github.com/vstanchev/3cdcd01fd997b7a062f34bfe2b3e6eca

vstanchev avatar Jul 15 '21 08:07 vstanchev

Thanks - that's good but obviously if you stop plotting you may forget so better if added to the flow itself!

andymarden avatar Jul 16 '21 13:07 andymarden

Here is an inotifywait based script I tweaked out of the previous ones posted here. It triggers every time the create event happens for a new plot at the start of the copy and deletes one random plot older than the set date https://gist.github.com/Fragger/7730f0ddf548d8c919e4a685560a19fe

Fragger avatar Jul 30 '21 07:07 Fragger