Last active
September 28, 2015 03:18
-
-
Save perifer/1376488 to your computer and use it in GitHub Desktop.
Clean up Drupal 6 db dump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Munge emails and reset passwords. | |
UPDATE users SET mail = CONCAT(name, '@localhost'), init = CONCAT(name, '@localhost'), pass = 'pass'; | |
-- UPDATE authmap SET authname = CONCAT(aid, '@localhost'); | |
-- Remove irrelevant data that bulks up the dump and contains IP-addresses | |
TRUNCATE cache; | |
TRUNCATE cache_block; | |
TRUNCATE cache_bootstrap; | |
TRUNCATE cache_field; | |
TRUNCATE cache_filter; | |
TRUNCATE cache_form; | |
TRUNCATE cache_image; | |
TRUNCATE cache_l10n_update; | |
TRUNCATE cache_media_xml; | |
TRUNCATE cache_menu; | |
TRUNCATE cache_page; | |
TRUNCATE cache_path; | |
TRUNCATE cache_token; | |
TRUNCATE cache_update; | |
TRUNCATE cache_views; | |
TRUNCATE cache_views_data; | |
TRUNCATE flood; | |
TRUNCATE history; | |
TRUNCATE search_dataset; | |
TRUNCATE search_index; | |
TRUNCATE search_total; | |
TRUNCATE sessions; | |
TRUNCATE watchdog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Munge emails and reset passwords. | |
UPDATE users SET mail = CONCAT(name, '@localhost'), init = CONCAT(name, '@localhost'), pass = MD5('pass'); | |
UPDATE comments SET mail = CONCAT(name, '@localhost'); | |
-- UPDATE authmap SET authname = CONCAT(aid, '@localhost'); | |
-- Remove scraped user data | |
TRUNCATE novalogin_userdata; | |
-- Clear out old webform entries which likely include e-mails | |
UPDATE webform_submitted_data set data='SCRUBBED'; | |
-- Remove irrelevant data that bulks up the dump and contains IP-addresses | |
TRUNCATE access; | |
TRUNCATE cache_block; | |
TRUNCATE cache_content; | |
TRUNCATE cache_filter; | |
TRUNCATE cache_form; | |
TRUNCATE cache_menu; | |
TRUNCATE cache_novalogin; | |
TRUNCATE cache_page; | |
TRUNCATE cache_rules; | |
TRUNCATE cache_update; | |
TRUNCATE cache_views; | |
TRUNCATE cache_views_data; | |
TRUNCATE devel_queries; | |
TRUNCATE devel_times; | |
TRUNCATE flood; | |
TRUNCATE history; | |
TRUNCATE search_dataset; | |
TRUNCATE search_index; | |
TRUNCATE search_total; | |
TRUNCATE sessions; | |
TRUNCATE watchdog; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment