Hello,

Is this module designed to work on a D8 website on a remote server as well as on a local Acquia Dev Desktop site? I can't get the init.php script to run in my terminal in order to enable the module. I keep getting the message 'Could not open input file: modules/composer_manager/scripts/init.php' when I am in my console.

I'm a tad confused. I want to be able to regularly back up my local site and not wait until it's on the server. I used to use Backup and Migrate. For now, I am exporting the database from phpmyadmin in my database manager to save a copy of the .sql file. Is this suitable?

Many thanks for any insight offered.

M

CommentFileSizeAuthor
#12 backup_db-adding_port-2662700-12.patch761 bytesJCL324
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lilbebel created an issue. See original summary.

lilbebel’s picture

Issue summary: View changes
swim’s picture

Hey,

this is a question for Acquia support or Composer Manager maintainers. Sadly I don't have any experience with the Acquia dev desktop and am unaware of how much access they provide. However I did find this bit of info.

lilbebel’s picture

Thanks swim. I read your link and it does seem that it can be run locally though I'm not sure if it can be done so with Acquia. I'll do some more digging and research.

M

swim’s picture

Status: Active » Closed (works as designed)

Let me know how you go =).

JCL324’s picture

I think I know why this is failing on local. I too am using Acquia DD2 but looking at the code, it doesn't appear to be setting the port. DD2 uses port 33067 and my error is simply:

"Could not perform backup, Connection to mysql failed with message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (61)"

I have tried to add the port in the code, but I'm new to D8 and not familiar with the connection string that it needs. The port is available in this var on line 32, I think it just needs to be added somewhere in lines 99-101.

$this->connectionOptions = Database::getConnection()->getConnectionOptions();

I will continue to try to get it to work but any help would be appreciated.

JCL324’s picture

So this didn't give me connection errors, but now it appears to dump everything to the screen and didn't download anything:

  protected function export() {
    try {
      // Database connection info.
      $connection = $this->connectionOptions['driver'] . ':' . 'host=';
      $connection .= $this->connectionOptions['host'] . ';port=';
      $connection .= $this->connectionOptions['port'] . ';dbname=';
      $connection .= $this->connectionOptions['database'];
swim’s picture

Hey JCL324,

try the latest dev and make sure the directory it's using as temp is writeable (maybe use public:// to test). The earlier dev release used private:// as the default path however if this is not set correctly odd things happen. Let me know how you go.

JCL324’s picture

That worked! First changing to public://, I got a local backup and was able to download as well. But not having a proper (or undefined) private:// files dir, it tried to creates a "private/" dir in the root. (Note the trailing slash). I do have the latest dev, I just downloaded today but it the default is still private://

So my code above appears to be the answer for local installs where the mysql port is non-standard :) Unfortunately I don't know how to create a proper patch :(

JCL324’s picture

Status: Closed (works as designed) » Needs review
swim’s picture

I'll credit you with the commit regardless ;). Just find an hour or so free and give this a read, it's easy going. Thanks for taking the time sorting this issue out; legend.

JCL324’s picture

Hope this works :)

  • swim committed 7c2c28e on 8.x-1.x authored by JCL324
    Issue #2662700 by JCL324: Include port in connectionOptions.
    
swim’s picture

Status: Needs review » Fixed

Looks good to me, thanks again.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.