Sauvegarde du WIKI: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
== auto backup == | == auto backup == | ||
* Install package | * Install automysqlbackup package | ||
== old == | == old == | ||
* Se connecter au serveur: | * Se connecter au serveur: |
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