Last active
December 19, 2017 18:02
-
-
Save bradfordcondon/f398426f761f8a1a27bf4f3062e2fa1c to your computer and use it in GitHub Desktop.
drush cheatsheet
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
#run database updates | |
drush updatedb | |
## Force a specific update to run | |
drush eval "module_load_install('tripal_elasticsearch'); tripal_elasticsearch_update_7201();" | |
drush dre [modulename] #disable, uninstall, re-install, enable module |
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
# Connect from bash | |
sudo su - postgres | |
pgsql | |
#Now that you're connected list and connect | |
\l | |
\c [db name] | |
#Copy the results of a query and export like so | |
COPY ( select uniquename from chado.feature WHERE type_id = 422) TO '/var/www/html/sites/default/files/host/Fexcelsior_list.csv' WITH (FORMAT csv, HEADER true); | |
pg_dump -U [db username] -d [database] > [backup output] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment