How to Dump Entire MySQL / MariaDB Backup

  • Create a backup of an entire MySQL / MariaDB Database Management System (DBMS):
mysqldump --all-databases --single-transaction --quick --lock-tables=false > full-backup-$(date +%F).sql -u root -p
  • Restore an entire DBMS backup. You will be prompted for the MySQL root user’s password:
    This will overwrite all current data in the MySQL database system

    mysql -u root -p < full-backup.sql

0 Komentar