Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drush]

Drush is a command line shell and Unix scripting interface for Drupal. CiviCRM for Drupal ships with a drush extension with a number of CiviCRM specific commands.

0
votes
1answer
17 views

Cron job has started producing output

I have a cron job /www/www/job.execute.sh That runs the civiCRM scheduled tasks: #!/bin/sh drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute This has been running successfully ...
1
vote
1answer
16 views

Define CIVICRM_LOGGING_DSN in PHP?

Is it possible to use PHP to define the CIVICRM_LOGGING_DSN setting located in civicrm.settings.php? We are using Drupal. I have successfully used the following to change some settings before: Civi:...
4
votes
0answers
21 views

Why when upgrading civi via drush I always get You are already upgraded to CiviCRM version-I'm-upgrading-from?

I saw a bug out there on this but it's old and claims to be fixed. I keep thinking the next time I do an upgrade, it'll be fixed. So for example: upgrading from 5.9.1 to 5.10.0 drush civicrm-...
1
vote
2answers
37 views

Drush sql-sync and civicrm issue

I wanted to quickly pull all the data (contacts, custom types, etc) from one Drupal CiviCRM install to another. I got a little too clever for myself and used Drush sql-sync to do it. It failed. As I ...
1
vote
1answer
19 views

Error using Drush and Civi API when adding data to a custom field with multi-select data

I have been trying to create contacts data using Drush and the CiviAPI. I get an error when I try to add data to a multi-select field despite using exactly the same syntax that the API explorer gives ...
1
vote
0answers
15 views

Please download Drush error when trying to execute CiviHR install script

I'm attempting to install CiviHR as per these instructions: https://github.com/compucorp/civihr-installer I'm using a GoDaddy shared linux server to install this on - but I have an issue. I've ...
1
vote
2answers
25 views

Is it possible to set the list of CiviCRM components from the command line using drush

drush and cv have both have commands to install extensions. But know I want to create a script that sets the CiviCRM components. Is it possible to do this?
2
votes
2answers
263 views

Error: Cron Not Running

For several months we have been seeing the error "Cron Not Running". I have repeatedly configured crontab for the root user, and currently have the following: 0 * * * * wget -O - -q -t 1 https://<...
3
votes
0answers
24 views

How are API calls logged consistently as a specific user?

I wrote some extensive scripts that are run through drush. I use the --user= switch in the drush command that supposedly runs the script as that user. The chosen user has a CiviCRM contact ID too ...
4
votes
2answers
150 views

How do I use cv to run database upgrades from the command line?

I'd like to run the database upgrades from the command line. I know I can do with with drush civicrm-upgrade-db but I'd like to know a way to do it in a CMS-agnostic way (that will work for Wordpress ...
0
votes
1answer
66 views

Drush civicrm-install failing with 'undefined function module_enable'

I'm using Drush 8, Drupal 7 and CiviCRM 4.7.18 The civicrm.drush.inc file that comes with CiviCRM (and is moved to ~/.drush/) has a call to a function called module_enable() which is not defined ...
1
vote
1answer
74 views

How can I download CiviCRM tar file with Drush?

Is there a way I can automatize this download in order to use drush civicrm-install I'm trying to automatize deployment of CiviCRM in Drupal 7
1
vote
1answer
75 views

What's the best way to fix this Drush clear cache bug?

https://issues.civicrm.org/jira/browse/CRM-20292 Hi gang, I'd love to fix the above bug for the core. Does anyone know the best way to solve it, or where I should begin to look for anything that may ...
3
votes
1answer
56 views

Drush cannot disable civicrm debug

The drush command drush civicrm-disable-debug returns error The drush command 'civicrm-disable-debug' could not be found. Run 'drush cache-clear drush' to clear the commandfile cache if you have ...
0
votes
1answer
290 views

Why do I get fatal error, memcached set failed?

Suddenly my dev site is throwing a fatal error whenever I try to use a drush command, even including drush version or drush cc all. I'm on Drupal 7.50 and CiviCRM 4.7.15, Drush 7.0.0 and I am unaware ...
2
votes
2answers
105 views

passing JSON objects to drush cvapi

I'm building API extension that takes complex objects as parameters. The API exporer does a brilliant job at parsing the objects, but drush less so. Commands I am trying are: `drush @contact cvapi ...
1
vote
1answer
81 views

Syntax for drush command civicrm-sql-dump

My attempt to backup my civicrm database using mysqldump has failed after a very rocky CiviCRM upgrade process, or it is taking way too long, so I am trying the drush command, drush civicrm-sql-dump ...
1
vote
2answers
57 views

Error Backing Up Database using drush: Call to undefined function drush_sql_dump_execute()

I am running Drupal 7.37 and CiviCRM 4.3.8. I am in the process of upgrading both, but currently get an error when manually creating a backup of the CiviCRM database. All regularly occurring daily ...
7
votes
1answer
132 views

What's the optimal way to install and track CiviCRM with Drupal and git?

First, I know compatibility with Drupal 8 is not full yet. There are still open bugs, a bunch of open PRs and an apparent lack of code review. But let's ignore that for a moment and consider civi d8-...
0
votes
1answer
88 views

Funky errors in 'drush cvup' / 'drush cvupdb'

I'm trying to upgrade from CiviCRM 4.7.4 to 4.7.9 for its security update. I'm doing this using 'drush' on my dev site. It seems to be hitting a couple different problems. Here's the first step: % ...
7
votes
1answer
92 views

Is command-line upgrade broken on CiviCRM 4.7.7?

I just tried upgrading a very vanilla site from 4.7.6 to 4.7.7. I ran drush civicrm-upgrade-db, which has worked previously on this site (which receives every point update - it's our internal CRM ...
4
votes
1answer
176 views

Can I chain API calls through drush?

API chaining works well in Javascript and PHP. For example, I can retrieve a contact's email addresses using this code generated by the API Explorer: Php $result = civicrm_api3('Contact', 'getsingle'...
3
votes
2answers
52 views

Drush failing to build database during new installation

I am building a Docker container for CiviCRM, it is 99.9% done. Unfortunately, when I try to install the actual module via Drush, it spits out an error. I am fairly certain this isn't a Docker related ...
5
votes
1answer
129 views

Install CiviCRM without installing the database. And install the database without installing CiviCRM

What madness is this? Sorry for the daft title. Let me explain. I'm trying to create a docker image for CiviCRM which separates out the web server, database server, and program data itself. In theory,...
6
votes
4answers
3k views

DB Error: unknown error

I'm trying to do some site development on my dev copy of the site, but I'm seeing the following error, both in the browser and in drush commands like drush cc all: Sorry but we are not able to ...
1
vote
3answers
279 views

drush requires civicrm to be enabled when installing in saltstack

I am trying to use saltstack to provision a centos 6.7 system that has drupal and civicrm. I have civicrm as a tar ball that I extract into sites/all/modules before trying to install. I am able to do ...
1
vote
1answer
227 views

Autoloader problem after upgrade to version 4.6.8

I'm not quite sure if this is a drush or a civicrm problem, sorry if this is the wrong forum. I did an upgrade yesterday evening from version 4.6.4 to version 4.6.8. Drush version is 5.9. Today I ...
11
votes
3answers
2k views

Is it easy to upgrade CiviCRM using drush?

The standard upgrade process for CiviCRM is quite a complex process according to the instructions in the wiki. Is it easier to use drush to upgrade CiviCRM? If so, how do you do this? I couldn't ...
4
votes
2answers
369 views

drush civicrm-sql-dump dumps the drupal database - how do I get it to dump the civicrm database?

I've recently made some backup scripts to automate backup of my site and databases. One of the scripts uses drush to dump the drupal and civicrm databases with these commands: drush @myserveralias cc ...
4
votes
4answers
589 views

CiviCRM does not have permission to write temp files

Two users are trying to access the temp files (where, for instance, the compiled templates are stored): www-data (when it's accessed from the website) and the sysadmin that run drush commands By ...
2
votes
1answer
161 views

Drush error: “Command … needs the following module(s) enabled to run: civicrm”

I am trying to use Drush to run a CiviCRM command (for example, civicrm-sql-dump and although CiviCRM is enabled and running fine, I get the following type of error: > drush civicrm-sql-dump > ...