Sauvegarde du WIKI: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
<pre> | <pre> | ||
mysql -u root -p -e "create database DBNEW" | mysql -u root -p -e "create database DBNEW" | ||
mysql -u root -p --default-character-set= | mysql -u root -p --default-character-set=latin1 DBNEW < DBNAME3.sql | ||
</pre> | </pre> | ||
Voir http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki | Voir http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki |
Revision as of 01:26, 7 July 2011
- Se connecter au serveur:
ssh userver@10.24.8.98
- Interdire l'écriture pendant la sauvegarde
LocalSettings.php
$wgReadOnly = 'site maintenance';
- Sauvegarde dans un fichier:
nice -n 19 /usr/bin/mysqldump -u root --password=**** wikidb --default-character-set=latin1 -c | nice -n 19 /bin/gzip -9 > ~/backup/wiki-wikidb-$(date '+%Y%m%d').sql.gz
- Restauration:
mysql -u root -p -e "create database DBNEW" mysql -u root -p --default-character-set=latin1 DBNEW < DBNAME3.sql