Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codemonauts/sqlstrip
Remove specific inserts from an sql dump before loading it for increased speed
https://github.com/codemonauts/sqlstrip
hacktoberfest
Last synced: about 4 hours ago
JSON representation
Remove specific inserts from an sql dump before loading it for increased speed
- Host: GitHub
- URL: https://github.com/codemonauts/sqlstrip
- Owner: codemonauts
- License: mit
- Created: 2021-03-25T16:45:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-03-25T17:14:17.000Z (over 3 years ago)
- Last Synced: 2024-04-17T02:03:25.412Z (7 months ago)
- Topics: hacktoberfest
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlstrip
When developing you often have to import database dump from e.g. your production servers to debug some problems.
These sql dumps can get quite big and take a long time and much power to import. Depending on your application you can
skip some tables which you don't need for local development (like cache tables).
This tool will accept a list of table names and then strip the `INSERT INTO` lines from the dump before you load it
into MySQL.## Usage
Pipe an sql dump through sqlstrip and pipe it directly into mysql:
```
cat dump.sql | sqlstrip -table templatecache -table users | mysql dev_table
```Of course you could also use `> dump_small.sql` to redirect the output into a new file.