Feature #92
openFeature #82: Implement a work copy of our website
Task #9: Add a cron script to make a static copy of Spip
Define a way to automatically put online a snapshot
90%
Description
Once snapshots are daily generated and purged, we need to analyze them to be able to decide whether a snapshot is correct or not and can go online. The objective is to do it automatically in the future. For this we can look at:
- the overall snapshot size, of about 15 MB
- the total number of files in the snapshot
Both should not decrease too much from one snapshot to another. Maybe we should record the full history of these parameters in a log file to be sure we can change algorithm parameters without risking to miss a case already seen.
Updated by Jean-Michel Philippe over 13 years ago
- Due date changed from 07/26/2011 to 07/01/2011
- Status changed from New to In Progress
- % Done changed from 0 to 20
I added code lines to log some measurements on mirrored website: size and number of files. These figures are logged in to logs/size.log
and logs/count.log
. There is a rotation process to keep at most 30 entries in log (can be tuned). These values will then be used to compute a statistical decision.
Updated by Jean-Michel Philippe about 13 years ago
- Due date changed from 07/01/2011 to 12/26/2011
- % Done changed from 20 to 40
The log rotation process is now ok and no data is lost. I propose the following algorithm for automatic updates of the static website:
- compute stats and log them
- check that stats are still increasing or stable
- check that no previous stats have shown a decrease
- put the static copy online
- remove snapshots older than 1 month
If the two tests are not all passed, I propose to record the stats in the log files but skip log rotation in order to preserve the full history from the time a decrease was detected. Of course the last two operation are not performed if tests do not pass.
Updated by Jean-Michel Philippe about 13 years ago
- Status changed from In Progress to Ready for test
- % Done changed from 40 to 90
- Estimated time changed from 3:00 h to 2:00 h
The code is online with “dangerous” actions commented out (link replacement and directory removal). Now need to check its functioning during several weeks.