Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] wiki
- Date: Sat, 18 Nov 2006 21:58:45 -0800
- From: Walter Hansen <gandalf@example.com>
- Subject: Re: [tlug] wiki
- References: <AA0639A1EB70AE409130258CE7BDC318323717@example.com>
- User-agent: Thunderbird 1.5.0.8 (Windows/20061025)
burlingk@example.com wrote:------------------------------
Message: 13 Date: Sun, 19 Nov 2006 11:26:25 +0900 From: "Josh Glover" <jmglov@example.com> Subject: Re: [tlug] wiki To: "Tokyo Linux Users Group" <tlug@example.com> Message-ID: <d8fcc0800611181826y107e8d9bh4413b2dd98244a94@example.com>
Locking is but one of the database-like features that wikis need. How about building and maintaining of link tables? How about indexing things for fast searching?
All of this could be done with flat files and grep, but why reinvent the wheel when MySQL / sqlite / PostgreSQL / etc. works just fine?
I think that the biggest worry seems to be recoverability in case of a database crash.
If a person is really totally worried about that, it is probably possible to create a script that semi-regularly dumps the databases information out into a flat text file. A second script of course would be needed to turn that data back into a database if the need were to arise.
The same interface that allows the wiki to interact with the database server to begin with should allow for such a script.
Another option however, is to simply back up a copy of the database itself, and if the server moves to another box, use the same version of the SQL software.
I use this little script for mysql. Mysqldump takes a snapshot of current data at that moment and saves it as a very large series of SQL statemnts in a plain text file. The thing is if you backup the files of a database you may inadvertently catch them mid update. This can mean you're backing up corrupted data. Mysqldump works with Mysql so it doesn't have this problem. The statement before this repairs the database. Once this is done it's whisked off the computer by the user backup.
#!/bin/sh
tdy=`date +%Y%m%d`
mysqlrepair --optimize --all-databases=1 --password=putpasswordhere 2>&1 | grep -v "Table is already up to date" | grep -v "OK"
mysqldump --all-databases --password=putpasswordhere > /home/backup/backup/mysql$tdy.sql
tar -czpf /home/backup/backup/mysql$tdy.gz /home/backup/backup/mysql$tdy.sql 2>&1 | grep -v "Removing leading"
rm -f /home/backup/backup/mysql$tdy.sql
chown backup:backup /home/backup/backup/mysql$tdy.gz
chmod 600 /home/backup/backup/mysql$tdy.gz
- Follow-Ups:
- Re: [tlug] wiki
- From: Keith Bawden
- Re: [tlug] wiki
- From: Shawn
- References:
- Re: [tlug] wiki
- From: burlingk
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] wiki
- Next by Date: Re: [tlug] wiki
- Previous by thread: Re: [tlug] wiki
- Next by thread: Re: [tlug] wiki
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links