[Cialug] MySQL Backup parsing

kristau kristau at gmail.com
Fri Sep 21 18:17:59 UTC 2018


Since the output from mysqldump is just plain text and "records" would
appear within that file as INSERT INTO statements, perhaps something
like the following might work?

  grep -i 'insert into' backupfile.sql | wc -l

I may be drastically oversimplifying this, though. . .

A very interesting question and problem.
On Fri, Sep 21, 2018 at 10:04 AM Andrew Denner <linux-list at upeke.com> wrote:
>
> The easiest way I know of is to do a restore onto a non prod environment
> and then do a count from there...
>
> On Thu, Sep 20, 2018 at 8:08 PM L. V. Lammert <lvl at omnitec.net> wrote:
>
> > Anyone ever played with a way to do a simple record count by db and/or
> > table in a backup? We have a server with a DB backup that shrunk over a GB
> > in the past few days for no known reason.
> >
> >         Lee
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> >
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



-- 
Tired programmer
Coding late into the night
The core dump follows


More information about the Cialug mailing list