Skip to content

Instantly share code, notes, and snippets.

@sobi3ch
Created July 6, 2015 21:27
Show Gist options
  • Select an option

  • Save sobi3ch/514a361aa71544ca1262 to your computer and use it in GitHub Desktop.

Select an option

Save sobi3ch/514a361aa71544ca1262 to your computer and use it in GitHub Desktop.
One line drush DB backup without cashe tables (defined in drushrc.php "common" in this example)
#!/bin/bash
drush -y sql-dump --structure-tables-key=common --gzip --result-file=path/based/on/drupal/root/to/your/backup.sql
@sobi3ch
Copy link
Author

sobi3ch commented Jul 6, 2015

Example of common tables to omit insed your drushrc.php https://github.com/Lullabot/drupal-boilerplate/blob/master/drush/drushrc.php#L177

@sobi3ch
Copy link
Author

sobi3ch commented Jul 6, 2015

Also is possible to create an drush-alias from it. Example drush-aliases https://github.com/Lullabot/drupal-boilerplate/blob/master/drush/drushrc.php#L56-L62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment