Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize command separate from sql-sync #89

Closed
jeff-h opened this issue Sep 12, 2013 · 3 comments
Closed

Sanitize command separate from sql-sync #89

jeff-h opened this issue Sep 12, 2013 · 3 comments

Comments

@jeff-h
Copy link
Contributor

jeff-h commented Sep 12, 2013

I think it would be useful to be able to sanitise a site without having to sql-sync. For example, let's say I have 30 compressed database backups (not sanitised — they're backups) and I want to use one on my dev site. I don't want to hit the live site for a fresh dump using sql-sync as that's heavy on the server.

To get this into my dev unsanitised I simply do:

gunzip -c myfile.sql.gz | drush @dev sqlc

To do this sanitised I have to use sql-sync, which has two problems:

a) can't take a gzipped dump file, so I have to gunzip it first somehow

b) needs me to

drush sql-sync @dev @dev

which is counterintuitive and seems to be redundantly dumping @dev to an .sql file then restoring it straight back, which takes quite a while on a large db.

I would love to be able to do:

gunzip -c myfile.sql.gz | drush @dev sqlc && drush @dev sanitize
@msonnabaum
Copy link
Contributor

We actually already have drush sql-sanitize, it's just hidden from help.

We should probably just unhide it.

@weitzman
Copy link
Member

I have no strong feeling on unhiding. We discussed this at https://drupal.org/node/1112142

@jeff-h
Copy link
Contributor Author

jeff-h commented Sep 12, 2013

Awesome! I searched the codebase before posting but missed it. Grr.

Would be a great one to unhide (from my perspective anyway).

@jeff-h jeff-h closed this as completed Sep 12, 2013
kostajh pushed a commit to kostajh/drush that referenced this issue Nov 26, 2013
As per drush-ops#89 (comment), unhiding sql-sanitize from help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants