I've written three short scripts that save the small graphs to three folders (the 1-day at the end of the day, the 1-week at the end of the week, and the 1-month at the end of the month) to keep them for future reference. They are activated using cron. Maybe others could be interested in this, and it could be made an option in the software?
My scripts are really crude, as I'm not at all an expert at this. The 24-hour graph is backed up at 23:59 each day, the 7-day at 23:58 on Sundays, and the monthly at 23:57 on the 30th day of the month. Not the 31st because of course not all months have 31 days, and those months would be skipped. Now that I think of it, with my script February probably gets skipped too, so this should be looked into.
It would have been better to save the files at 0:00 of the first day of the month (and the same for the other graphs) but then it would already be the following month, and since I use the "date" command to time-code the files, then the file name would not match the period of time it refers to.
Anyway, I created three folders under .temperature:
cd ~/.temperature
mkdir daily
mkdir weekly
mkdir monthly
Then I created the three scripts, named daily_copy.sh, weekly_copy.sh, monthly_copy.sh. They just copy the relevant file to the correct folder (date-coding it in the filename).
daily_copy.sh:
#!/bin/bash
cp ~/.temperature/temperature-1-days.png ~/.temperature/daily/`date +%Y_%m_%d_`1_day.png
weekly_copy.sh:
#!/bin/bash
cp ~/.temperature/temperature-7-days.png ~/.temperature/weekly/`date +%Y_%m_%d_`7_days.png
monthly_copy.sh:
#!/bin/bash
cp ~/.temperature/temperature-30-days.png ~/.temperature/monthly/`date +%Y_%m_%d_`30_days.png
I then made them executable:
sudo chmod +x daily_copy.sh
sudo chmod +x weekly_copy.sh
sudo chmod +x monthly_copy.sh
Then I edited the file /etc/crontab and added the following lines:
59 23 * * * pi /home/pi/.temperature/daily_copy.sh
58 23 * * 7 pi /home/pi/.temperature/weekly_copy.sh
57 23 30 * * pi /home/pi/.temperature/monthly_copy.sh
and, without the need to reboot, I stopped and restarted cron:
sudo /etc/init.d/cron stop
sudo /etc/init.d/cron start
and that's it. Very crude, but it works, with the exceptions described above...
Cristian