In anticipation of an SD card failure

I’m being pessimistic, so in order to prevent a bit of a faff when it eventually does fail I’d like to put a new card in now.

Is it a simple matter of turning off the device and copying the contents of the existing card onto the new and replacing the new card within the device ?

Also, I’d like to say thanks to Bob for this wonderful device, and wish him lots of happy days relaxing in the future.

I’ve just checked the purchase date and it shipped from that other energy monitoring place in the UK mid November 2017 ! … and it has worked flawlessly ever since (apart from a few user errors). I wonder who has the longest running running one.

Thank you Bob.

Short answer is replacing the SDcard after 5 years would be good practice whether it needs it or not.

I say this mostly because the low-write algorithm was only implemented in the last few years, so your card may have a history of excessive writes. That said, once the current log wraps after a year, the writes are minimal anyway. It’s not about the actual datalog writes, which counterintuitively are actually doubled in the first year with the low-write scheme, it’s about the directory update when the file was extended after each write. With the low-write scheme, the file is extended by a couple of minutes worth of space, the directory updated (flush()) and then there is no directory update needed as that space is overwritten with the new log records.

After a year, when the file wraps, the file is no longer extended and so there are no longer directory updates.

Same goes for the history log only the frequency is 1/12 that of the current log (1 min vs 5 seconds) but it doesn’t wrap (for 10 years) and so does continue to do directory updates every 48 minutes. 11K writes/year should not be a problem.

I think the last time I changed my card was a couple of years ago. Here are my logs with 6+ years of history.
image

So I can do this: