Backup and restore a mysql table using mysqldump
- Category : Linux Helpline (Easy Guide)
- Posted on : Jun 01, 2019
- Views : 1,950
- By : Hagen V.
There are two methods for taking backup of a single table from a database and restore in into another database
1) Method 1
In this method you can take a backup of a database table and restore into another db. But this restoration will remove the already existing table and recreate it in the new database .
# mysqldump old_db table > old_db.table.sql
# mysql new_db < old_db.table.sql
2)Method 2
In this method you can table only the backup of database table data ( not the sql scheme ) and restore it into new database without removing the old data in new database
# mysqldump -t old_db table > old_db.table.sql
# mysql new_db << old_db.table.sql
Make sure to table backups of new database before doing the restoration
Categories
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Jul 25
-
Posted on : Jul 07
-
Posted on : Apr 07
-
Posted on : Mar 19
Optimized my.cnf configuration for MySQL 8 (on cPanel/WHM servers)
Tags
- layer 7
- tweak
- kill
- process
- sql
- Knowledge
- vpn
- seo vpn
- wireguard
- webmail
- ddos mitigation
- attack
- ddos
- DMARC
- server load
- Development
- nginx
- php-fpm
- cheap vpn
- Hosting Security
- xampp
- Plesk
- cpulimit
- VPS Hosting
- smtp
- smtp relay
- exim
- Comparison
- cpu
- WHM
- mariadb
- encryption
- sysstat
- optimize
- Link Building
- apache
- centos
- Small Business
- VPS
- Error
- SSD Hosting
- Networking
- optimization
- DNS
- mysql
- ubuntu
- Linux