If I have [multiple] .sql dump files, is there a command or tool that would allow me to see a preview of the file ?
e.g: db-preview backup.sql
tables (40)
----------
- users (1200)
- articles (450)
...
If I have [multiple] .sql dump files, is there a command or tool that would allow me to see a preview of the file ?
e.g: db-preview backup.sql
tables (40)
----------
- users (1200)
- articles (450)
...
For MySQL and PostgreSQL at least, database dump files are just text files full of SQL commands. So you can use the usual command line tools to get some idea of the contents. For example
grep 'CREATE TABLE' dump.sql | wc -l
to count how many tables are created. Not as slick as what you're hoping to find, of course.