For DB Backup : -
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME > dumpfile.sql
For Table Backup : -
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME > table.sql
For Only Table Structure :-
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME –no-data > table.sql
You Can Restore Dump as Below : -
mysql > source /path/SQLfile
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME > dumpfile.sql
For Table Backup : -
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME > table.sql
For Only Table Structure :-
mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME –no-data > table.sql
You Can Restore Dump as Below : -
mysql > source /path/SQLfile
nice thanks for this.how can we take backup only update data from table. becaus it is too big like 80mb etc.?
ReplyDeleteMySQL supports incremental backups: You must start the server with the --log-bin option to enable binary logging. The binary log files provide you with the information you need to replicate changes to the database that are made subsequent to the point at which you performed a backup.
ReplyDelete#mysqlbinlog binlog_files > temp
#mysql -u root -p < temp
You must start the server with the --log-bin option to enable binary logging.
ReplyDelete#mysqlbinlog binfile > temp
#mysql -u root -p < temp