Difference between revisions of "Manually backup a wiki"
(→See also: Change the character-set of a wiki database) |
|||
Line 29: | Line 29: | ||
== See also == | == See also == | ||
*[[Backup]] | *[[Backup]] | ||
+ | *[[Change the character-set of a wiki database]] |
Revision as of 23:39, 7 October 2012
Manually backup a wiki Organic Design procedure |
There is a backup script you can run called /var/www/backup.pl which currently backs up and compresses all the mysql databases for all wikis into one compressed file and names them all-yyyy-mm-dd.sql.7z. This will soon be updated to allow a parameter to specify a specific database and optional table prefix, and also an optional filename if the default file name is not appropriate.
Each database may contain more than one wiki, these will be uniquely identified using table prefixes.
First principles using mysqldump
- Backup and compress DB & FS
Character encoding issues
There can be some problems with MySQL dumps concerning character encodings. Most of these problems are covered here. It seems that to ensure you have a proper UTF-8 encoded text file you must set the character set to latin1. When importing this dump you may need to manually change the /*!40101 SET NAMES latin1 */ to /*!40101 SET NAMES utf8 */.
These problems don't always seem to occur - I have usually had no trouble with non latin1 exports being reimported again with special characters working fine even though looking at the dump in a text editor shows mangled characters. But sometimes - perhaps depending on the versions of the MySQL servers being imported and exported between - these special steps need to be taken.