A simple tool to dump and load CiviCRM configuration.
Go to file
autonomic 145a0f698d Changed operator for contact subtype to "contains"
When it was "=" it didn't get ones with multiple subtypes.
2022-03-09 09:39:29 +01:00
.gitignore added utf8 support & added confdump.venv to gitignore 2022-03-01 17:32:30 +01:00
confdump.py Changed operator for contact subtype to "contains" 2022-03-09 09:39:29 +01:00
example.env Add README for steps to load data into test instance. fix error in code. add requirements.txt 2022-02-02 21:13:07 -08:00
README.md Updated readme 2022-02-25 08:50:14 +00:00
requirements.txt Add README for steps to load data into test instance. fix error in code. add requirements.txt 2022-02-02 21:13:07 -08:00
tox.ini Initial checkin 2021-11-22 14:52:03 -08:00

  • Needs working local CiviCRM from caat-crm-installer
  • Install pre-dependencies for MySQL client https://pypi.org/project/mysqlclient/ (on dpkg based linux: sudo apt install python3-dev default-libmysqlclient-dev build-essential)
  • In confdump path, virtualenv confdump.venv
  • Load the virtualenv . confdump.venv/bin/activate
  • Install requirements pip install -r requirements.txt
  • cp example.env .env
  • Edit .env and add creds for the production, test or development server you'll retrieve the data from.
  • Execute dump to retrieve base data: env $(cat example.env) python ./confdump.py dump -o mydata INSTANCEPATH where INSTANCEPATH is something like https://crm.dev.caat.org.uk/.
  • IMPORTANT!! - If you sourced the data from live, you must delete the .env file or delete the creds from inside it. If you leave them in it will negate the whole purpose of having this conf dump utility, which is to provide a way of creating a local site without any sensitive data.
  • If your civicrm is in a docker container, load data into running local instance with: confdump.py mysql -i mydata/ -p 63306
  • Otherwise use confdump.py mysql -i mydata/ --host=<host> --db=<db> --user=<user> --password=<password>
  • Clear the cache in CiviCRM:
    • DOCKER: make shell, and then inside the shell cd /app; ./vendor/bin/drush cc all
    • NORMAL: cd web; vendor/bin/drush cc all