http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
is a manual for making a scheduled backup.
It states the importance of making such a backup.
In fact, it states that every mediawiki should make such a backup.
I can't agree more.
Without any activity on my part on the wiki, and I suppose no activity from users (the wiki is not being promoted yet) the database got corrupt.
I haven't got a clue why this happened, but it learns me a wiki is rather vulnerable in that way.
But, and now my point comes, the manual is not a manual at all, or only a manual for expert users.
I would like to make it a real manual, but can't do that alone because I'm nor an expert myself, au contraire. But I can state how a good manual can look like (and help myself realizing my own scheduled manual; Anyway, I could not get it working yet).
This is the cron command:
/usr/bin/nice -n 19 /usr/bin/mysqldump -u $USER --password=$PASSWORD $DATABASE -c | /usr/bin/nice -n 19 /bin/gzip -9 > ~/backup/wiki-$DATABASE-$(date '+%Y%m%d').sql.gz
a. First about the program-needs of the cronjob.
I myself have DirectAdmin, a very common used program (a program by the way you never can choose yourself). The manual should state in which way the command needs to be crosschecked with the program (which arguments are program-depended, which not; likewise: which arguments are user-dependent).
I have doubts about:
* /usr/bin/nice (nice?)
* 19 and 9 (is this really correct?)
* -u $USER
is this the user in the reseller account or the username of the database?
in DirectAdmin only the resellers account can make a cronjob, and therefore the user in question should be stated, otherwise it makes a backup of the resellers-database
should USER be replaced by the username of the account, or the domainname (or the $ as well?)
* ~/backup/
should you make the directory yourself and where should it be placed (not sure about the ~)
where should I find the backupfile if it's working properly (I think in the resellers account..)
* can the command line always find the database?
or should there be a check of some sort?
b. user dependent
* replace PASSWORD with the database password (or the $ as well?)
* replace DATABASE with the username of the database (true?)
* replace the second DATABASE ? or is it just the name of the file