# Data logging to flat file (CSV) and SD card longevity

**URL:** <https://www.wago.community/t/data-logging-to-flat-file-csv-and-sd-card-longevity/2461>\
**Category:** Hardware and Linux\
**Created:** [December 10, 2025, 9:23am UTC](https://www.wago.community/t/data-logging-to-flat-file-csv-and-sd-card-longevity/2461 "2025-12-10T09:23:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [December 11, 2025, 7:50am UTC](https://www.wago.community/t/data-logging-to-flat-file-csv-and-sd-card-longevity/2461/2 "2025-12-11T07:50:40Z")

</div>

First, I would suggest to use only industrial grade SD cards like WAGO’s.  
They have up to 20 000 write cycles per cell and up to 10 years data retention.  
The max number of writes is a number per cell, and not for the whole SD card of course.  
The lifetime will depend on many factor like the free space available (the more there are the more the writes are “spread” on different cells), the temperature, the number of writes indeed.  
I would also recommand to use a buffer that you can place in RETAIN memory, then the data won’t be lost if a power outage occurs. It will reduce the number of writes a lot.

Additional hint, consider this to take a look to the status of yoru SD card (if it supports S.M.A.R.T)

> [@How To get memory card life time expectancy](https://www.wago.community/t/how-to-get-memory-card-life-time-expectancy/1679):
>
> If you wish to get the life time expectancy of a WAGO memory card, here is a solution. 8Gb WAGO memory card support S.M.A.R.T (Self-Monitoring, Analysis and Reporting Technology), and thanks to a software tool from Swissbit, advanced diagnosis data can be read out, either with a computer software, or even with a small binary that you can install directly in the controller. ./sbdm-cli Swissbit Device Manager 1.2.4 Please wait while SBDM is scanning for devices... /dev/mmcblk0 ------------ …

---

_[View the full topic](https://www.wago.community/t/data-logging-to-flat-file-csv-and-sd-card-longevity/2461)._
