LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Monday, August 12, 2019

How to Dump Entire MySQL / MariaDB Backup

0 comments
  • 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
    

No comments:

Post a Comment