I am doing regular backups of our whole database, the file has about 200MB. From this big file, I need to import only one table to our database. Because I think it wouldn't be necessary to truncate all tables and then import data to all of the tables, I am looking for a way how to import data into only one database table.
I found this topic, where is recommended to fetch the data of the respective table this way:
$ sed -n -e '/CREATE TABLE.*mytable/,/CREATE TABLE/p' mysql.dump > mytable.dump
But when I opened the file with the database backup, the data there are in this format:
1f8b 0808 d107 9854 0203 3230 3134 3132
3232 3037 3532 3231 2d32 3031 342d 3132
...
So I cannot use the method mentioned above.
How could I import data from only one to the database?
Thank you in advance.
EDIT: How the backups are made
`mysqldump -u #{db_config['username']} -p#{db_config['password']} -i -c -q #{db_config['database']} > tmp/#{backup_filename}`
`gzip -9 tmp/#{backup_filename}`
Example of the file name: 20141220212448-2014-12-21_12-00-06.sql