| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| How to recover from setting incorrect system date? http://www.steveshipway.org/forum/viewtopic.php?f=2&t=1573 |
Page 1 of 1 |
| Author: | vk2him [ Thu May 29, 2008 11:22 am ] |
| Post subject: | How to recover from setting incorrect system date? |
Geeetings all, I have accidentally set my system date to a date in the future Is there a way to recover from this, apart from waiting until the last update time/date is reached when it will start recording again. Thanks in advance |
|
| Author: | stevesh [ Fri May 30, 2008 10:54 am ] |
| Post subject: | Re: How to recover from setting incorrect system date? |
This can be done, but it is not simple. If your date error was about 1 day or less, you can probably just live with it. If it is more, however, you should most likely restore your most recent backup of the RRD files. To understand the problem, you need to know how RRDTool stores the data. The RRD file holds the time of the last update, and it will not accept updates back into the past. It also expires summary (RRA) data based on this time, so if your incorrect time was too far into the future, you may well have lost all of the historical data anyway. To correct the problem, you need to use rrdtool to dump the RRD file to XML, then edit the XML to set the last update time (which is in seconds since the epoch) to the time required, and remove the RRA data lines for all data after this time. This is probably too difficult to do by hand more than once, so you'd need to write a script to do it for you. Then, load the XML back into rrdtool to create an updated RRD file. The real problem is that you won't get back any expired historical data, so if you set the date to be (for example) two months into the future, then your daily, weekly and monthly graphs will be empty anyway, only the yearly having data (and the oldest two months will be empty too). A better solution long-term to prevent this is to enable RRD Archiving using the Routers2 archiving script, which will give you an archived history for every day (or week, or month dpeneding on the frequency you choose). You do need to have a lot of spare disk space for the archives, though! |
|
| Author: | vk2him [ Sat May 31, 2008 12:23 am ] |
| Post subject: | Re: How to recover from setting incorrect system date? |
Thanks for the reply Steve, luckily I only set the date forward by two days, so it should be recovered by tomorrow. Thanks for the explanation, I'll read the documentation about the archiving Cheers |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|