Sauvegarde d'une base Mysql (BACKUP DATABASE)


[root@vp4-2 home]# mysql -u root -pPetitPassword
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10912
Server version: 5.1.70-cll MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show database
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
mysql> show databases ;
+-------------------------+
| Database                |
+-------------------------+
| information_schema      |
| azzorin                 |
| boutique_magento        |
| codepostauxBB           |
| coffretd_coffretd       |
| coloriage               |
| cphulkd                 |
| dvdsurle_coffretd       |
| dvdsurle_dvdsurle       |
| eximstats               |
| horde                   |
| ikonik                  |
| iphone_babynounou       |
| leechprotect            |
| lepastis                |
| livingroom              |
| logaholicDB_vp4_2       |
| magentobackup           |
| mantis                  |
| moncornerbio            |
| mysql                   |
| ocr_yeapagency          |
| perl5                   |
| pign65_1420boutique     |
| pign65_1510boutique     |
| pign65_1600boutique     |
| pign65_V1boutique       |
| pign65_V2boutique       |
| pign65_boutique         |
| pign65_testboutique     |
| profde63_instrument     |
| rafa                    |
| roundcube               |
| sporta61_coachsportadom |
| tibet                   |
| toitoi87_immo           |
+-------------------------+
47 rows in set (0.00 sec)

mysql> mysql 

[root@vp4-2 lepastis]# mysqldump -u root -pPetitPassword --databases lepastis > lepastis_29092013.sql
[root@vp4-2 lepastis]# tail lepastis_29092013.sql 

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-09-29 13:10:56
[root@vp4-2 lepastis]# gzip -v9 lepastis_29092013.sql
lepastis_29092013.sql:	 82.4% -- replaced with lepastis_29092013.sql.gz
[root@vp4-2 lepastis]# ls -l lepastis_29092013.sql.gz
-rw-r--r-- 1 root root 73474 29 sept. 13:10 lepastis_29092013.sql.gz
[root@vp4-2 lepastis]#