Skip to content

Simple AWK script to remove the cache tables information from a large dump file

License

Notifications You must be signed in to change notification settings

icampana/d7-cache-removal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Drupal 7 Cache tables data dump removal

Simple AWK script to remove the cache tables data from a large dump file

It can handle an uncompressed SQL file or directly an gzipped file, you need to have gzip installed and gawk, if using Linux it should work out of the box. In OSX can be installed with Homebrew.

Use

Simply pipe the SQL output to the script and it will generate a new gzipped database dump without the cache data (but still include the table structure).

gunzip -c database.sql.gz | gawk -f ./db_cleanup.awk

Alternative

Can also use a different resulting filename by setting a custom awk var, like this:

gunzip -c database.sql.gz | gawk -v output_file=new_db.sql.gz -f ./db_cleanup.awk

About

Simple AWK script to remove the cache tables information from a large dump file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages