Difference between revisions of "Manually backup a wiki"
From Organic Design wiki
(New page: {{procedure |role = sysop }} There is...) |
(→First principles using mysqldump) |
||
Line 10: | Line 10: | ||
{{code| | {{code| | ||
<bash> | <bash> | ||
− | mysqldump -u [user] --password='**********' -A > | 7za a -si backupfile.sql.7z # Backup | + | mysqldump -u [user] --password='**********' --default-character-set=latin1 -A > | 7za a -si backupfile.sql.7z # Backup |
tar cf - directory | 7za a -si backupfile.t7z | tar cf - directory | 7za a -si backupfile.t7z | ||
</bash> | </bash> | ||
Line 17: | Line 17: | ||
{{code| | {{code| | ||
<bash> | <bash> | ||
− | mysqldump -u [user] --password='**********' --single-transaction -B [database] > backupfile.sql # Backup | + | mysqldump -u [user] --password='**********' --single-transaction --default-character-set=latin1 -B [database] > backupfile.sql # Backup |
mysql -u [user] -p [database] < backupfile.sql # Restore | mysql -u [user] -p [database] < backupfile.sql # Restore | ||
</bash> | </bash> | ||
}} | }} |
Revision as of 18:09, 24 February 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