690 shaares
3 liens privés
3 liens privés
save :
sudo -u mysql mysqldump --protocol=socket -S /var/run/mysqld/mysqld.sock --all-databases -p | bzip2 -c > databasebackup.sql.bz2
restore :
bzip2 -d databasebackup.sql.bz2
sudo -u mysql --protocol=socket -S /var/run/mysqld/mysqld.sock < databasebackup.sql
si droits root (création de base, etc...)
sudo -u mysql -u root -p --protocol=socket -S /var/run/mysqld/mysqld.sock < databasebackup.sql