Sauvegarde du WIKI: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== auto backup == | |||
* Install automysqlbackup package | |||
== old == | |||
* Se connecter au serveur: | * Se connecter au serveur: | ||
<pre>ssh userver@ | <pre>ssh userver@XXXX</pre> | ||
* Interdire l'écriture pendant la sauvegarde | * Interdire l'écriture pendant la sauvegarde |
Latest revision as of 17:00, 11 March 2022
auto backup
- Install automysqlbackup package
old
- Se connecter au serveur:
ssh userver@XXXX
- 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