| 20 | * Run the sync bash script to get up-to-date data in your local install |
| 21 | |
| 22 | == Synchronizing == |
| 23 | |
| 24 | The outreach.mayfirst.org CiviCRM database is synchronized with the [wiki:control-panel red control panel] membership data. It is a one-way sync from the control panel to CiviCRM. It happens in two parts: |
| 25 | |
| 26 | * On hay.mayfirst.org, a cron job (/etc/cron.d/red-outreach-sync) executes /usr/local/sbin/mf-dump-membership-data, which places a copy of the membership dump data, in json format, into the home directory of /home/outreach-sync |
| 27 | * On rodolpho (where outreach.mayfirst.org lives) a cron job executes /home/members/mayfirst/sites/outreach.mayfirst.org/users/mfpl-outreach/sync-membership-data, which copies the json data over to rodolpho, and then executes: |
| 28 | {{{ |
| 29 | drush mfc-import-members --import-file=/home/members/mayfirst/sites/outreach.mayfirst.org/users/mfpl-outreach/membership-dumps/members.json |
| 30 | drush mfc-import-contacts --import-file=/home/members/mayfirst/sites/outreach.mayfirst.org/users/mfpl-outreach/membership-dumps/contacts.json |
| 31 | drush mfc-import-use-accounts --import-file=/home/members/mayfirst/sites/outreach.mayfirst.org/users/mfpl-outreach/membership-dumps/user-accounts.json |
| 32 | }}} |
| 33 | |
| 34 | The drush commands are defined in the mfc drupal module - which is part of the git repo (see above). |