« FeministWiki:Server setup » : différence entre les versions

Ligne 113 : Ligne 113 :
=== Copy over SQL databases ===
=== Copy over SQL databases ===


The following command can be used to create a dump of all databases.  You can use the <code>show databases;</code> command in the SQL console to make sure that the list of databases is complete.  (Unfortunately they have to be listed manually, because using the <code>--all-databases</code> option includes system databases that we don't want.)
The following command can be used to create a dump of all databases and import it on the new server.  You can use the <code>show databases;</code> command in the SQL console to make sure that the list of databases is complete.  (Unfortunately they have to be listed manually, because using the <code>--all-databases</code> option includes system databases that we don't want.)


  mysqldump -u root -p"$(cat /root/pwd/mysql)" > all-databases.sql \
  mysqldump -u root -p"$(cat /root/pwd/mysql)" \
   --databases blogs \
   --databases blogs \
               feministblog \
               feministblog \
Ligne 127 : Ligne 127 :
               feministwiki_it \
               feministwiki_it \
               feministwiki_pt \
               feministwiki_pt \
               fff
               fff \
 
  | ssh root@feministwiki.dev 'mysql -u root -p"$(cat /root/pwd/mysql)"'
You can then copy over this file to the new server and execute it via:
 
mysql -u root -p"$(cat /root/pwd/mysql)" < all-databases.sql


=== Copy over /var/www ===
=== Copy over /var/www ===