On 2017-04-26 09:38:09 +0800, Paul Wise wrote: > On Tue, 2017-04-25 at 17:22 +0200, Aurelien Jarno wrote: > > Hmm, it only works for one change, after that the .old file will be > > overwritten causing the data loss. I guess the filename should include > > the date and time.
Or an index that would increment (".1", ".2", ".3", etc.) until the file is not found. It would be simpler and sufficient, as the date and time are already in the mtime of the file. > Yes, I didn't implement this because my C skills are rusty. Also, the > time between events should be long so the admin should notice the log > error before the old file is overwritten and RRD rotates out old data > anyway AFAIK. Not necessarily. The user doesn't necessarily look at the RRD data regularly, but for instance only in case of problems. Then, one may want to see what happened in the previous months or years[*], to see if the data were similar. [*] For instance, it could be the previous summer(s) to have similar weather (external temperature) conditions. > Also the old file will be in backups. It could have been overwritten in backups. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)