This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
db_sync.sh
executable file
·11 lines (6 loc) · 2.05 KB
/
db_sync.sh
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
drush --alias-path=. @live sql-dump --tables-list=comment,comment_abuse,field_data_body,field_data_comment_body,field_data_field_area_of_expertise,field_data_field_biography,field_data_field_description,field_data_field_file,field_data_field_first_name,field_data_field_job_title,field_data_field_keyword,field_data_field_last_name,field_data_field_location_address,field_data_field_location_city,field_data_field_location_place,field_data_field_postal_code,field_data_field_profession,field_data_field_subject,field_data_field_user_image,field_data_field_message_text,field_revision_body,field_revision_comment_body,field_revision_field_area_of_expertise,field_revision_field_biography,field_revision_field_description,field_revision_field_file,field_revision_field_first_name,field_revision_field_job_title,field_revision_field_keyword,field_revision_field_last_name,field_revision_field_location_address,field_revision_field_location_city,field_revision_field_location_place,field_revision_field_location_postal_code,field_revision_field_profession,field_revision_field_subject,field_revision_field_user_image,field_revision_field_message_text,file_managed,file_usage,flag_counts,flagging,message,node,node_comment_statistics,node_revision,taxonomy_index,taxonomy_term_data,taxonomy_term_hierarchy,users,users_roles,field_data_field_external_link,field_data_field_file_upload,field_data_field_file_upload_comment,field_data_field_leaf,field_data_field_message_node_reference,field_data_field_phone_number,field_data_field_subject_reference,field_data_field_tree,field_revision_field_external_link,field_revision_field_file_upload,field_revision_field_file_upload_comment,field_revision_field_leaf,field_revision_field_message_node_reference,field_revision_field_phone_number,field_revision_field_subject_reference,field_revision_field_tree,node_counter > loop_sync.sql
vagrant ssh -c "cd /var/www && drush sql-query --file=/vagrant/loop_sync.sql"
drush --alias-path=. rsync @live:%files/ htdocs/sites/default/files
vagrant ssh -c "cd /var/www && drush cc all"
rm loop_sync.sql