i installed openwrt/lede years ago on my router.
in addition i installed the luci statistics based on collectd and rrd-tool.
even after hours of trial and error i am not able to extend the default timespan of one year to multiple years.
if anyone would be so kind to help me out and/or point me to the right direction i'd be thankful.
I am not quite sure how the old data will be handled. It is possible that you will lose the old data, so it is best to backup that first.
You need to at least modify the config file (via LuCI or text editor), and then restart luci_statistics.
But I have never tried to add a new longer period there, so I am not quite sure how the existing files will be handled if the time period definitions do change. Possibly the new data period will be just added, or alternatively the old data is destroyed.
You probably know that at already, but it is pretty easy to see inside the RRD files (and even manipulate the data) with rrdtool app. You might practice making and restoring RRD backups with it.
I tested on my own router and added a new period "3year" and restarted the statistics. It runs ok, but does not add new data to the database. It is possible that new data would be added when the next minor time period get filled, but I doubt.
I tried with 3year (a long one) and 8hour (a short one), but neither produced more data in the database, at least initially.
Luci shows a graph for the 8 hour data definition, but that is probably taken from the 1day data.
I guess that you are on your own to google for RRD database handling advice, good choices are probably the rrdtool site plus collectd site.