[Cialug] MySQL Backup parsing
L. V. Lammert
lvl at omnitec.net
Fri Sep 21 18:30:39 UTC 2018
On Fri, 21 Sep 2018, kristau wrote:
> Since the output from mysqldump is just plain text and "records"
> wouldappear within that file as INSERT INTO statements, perhaps
> somethinglike the following might work?
>
> grep -i 'insert into' backupfile.sql | wc -l
>
That works, .. but when editing a 10GB file it is really a "peck and wait"
issue, as well as being really hard to make sure what is being select is
accurate.
The bigger issue is tracking recreation of a table - in many cases, there
could be new data present, so the backup must be appeneded, instead of
restored.
TFTR!
Lee
More information about the Cialug
mailing list