Maths : Keeping total of last 30 days and previous 30

Just use EEPROM, writing once a day into at array of 60 will not wear out the memory for millenia!

You will have to write round-robin style though, not shuffling the array.