-
Notifications
You must be signed in to change notification settings - Fork 4
Log files and Backups
These files (production.log
) are written by the app and live in /var/apps/ratings/shared/log
.
They are rolled over and compressed into /var/apps/ratings/shared/log/old
by virtue of the logrotate
script, /etc/logrotate.d/ratings
. At the moment, up to 30 days worth are kept.
Apache log files are analysed by webalizer. Config file is in /etc/webalizer/ratings.conf
, cron job is run under root.
The production database (ratings_production
) is backed-up once every day by a custom perl script (/home/mjo/bin/mysql_bak
) running under crond
. The backup files are initially placed in /home/mjo/bak/ratings/daily
. However these are rolled over into parallel directories.
-
daily
- up to 40 files -
monthly
- up to 20 files -
yearly
- unlimited
The database on the www.icu.ie server is regularly backup up on that server (as well as the code). To stop these files building up and using up our hard drive allocation they need to be transfered off that server.
Between 2006 and late 2011 the files were moved to an old Windows computer belonging to the website administrator. However, from late 2011 onwards, they have been moved instead to the ratings server which has a number of advantages (it has a complete system backup of it's own and, unlike the administrators old computer, it's up 24/7).
The program that does this is /home/mjo/bin/icu_bak
and it's scheduled to run daily under crond
. The files are written to subdirectories of /home/mjo/bak/icu
and the program logs it's activity to /home/mjo/bak/icu/bak.log
.
We currently pay a small monthly fee to our hosting company (Linode) for an optional extra feature - complete system backups to a separate server. These can be accessed via the Backups link from our Linode dashboard and occur daily. These backups provide the basis for a disaster recovery plan.