MySQL - Backup/Restore single table using mysqldump
Verification before restore Check number of records SELECT COUNT(*) FROM zabgate.host_inventory; -- 5874 lines Backup table steps using mysqldump 1) Create temporary backup directory (e.g /var/backups/zabgate/mysqldump) and give permission to mysql (ignore if path exist) drwxr-xr-x 2 mysql mysql 47 Mar 27 04:39 mysqldump 2) Backup table using mysqldump Command : Single table : mysqldump -uitdba -p db_name table_name > path/table_name.sql Multiple table: mysqldump -u root -p dbname table1 table2 table3 > table.sql Execution : mysqldump -uitdba -p zabgate host_inventory > /var/backups/zabgate/mysqldump/host_inventory_190327.sql Restore table steps 1) Create temp schema/ db Mysql > create database temp_backup; 2) Move the sql file from mysqldump directory to restore schema and make sure it's executable under mysql mv /var/backups/zabgate/mysqldump/host_inventory_190327.sql /seamnt/prd101/mysql/temp_backup/ 3) Restore table C...