D8 config export on Acquia Cloud

D8 config export on Acquia Cloud

3 posts / 0 new
Last post
jason@tincan.co.uk's picture
jason
Points: 0
D8 config export on Acquia Cloud

Hi,

Acquia provide a 'VCS' location so that Drupal can export config YAML files there. But it doesn't have write permission?

Here's me trying to run the drush config-export command over SSH:

d8sandboxxx2@d8sandboxxx2:~$ drush @d8sandboxxx2.dev config-export
Choose a destination.
[0]  :  Cancel
[1]  :  sync  
[2]  :  vcs
2
The file permissions could not be set on /mnt/www/html/d8sandboxxx27iynasv9p9/docroot/../config/default.                               [error]

Please advise? It would be a pity to not be able to use one of the most awaited features in Drupal 8.

Cheers,
Jason

Status: 
Duplicate
anavarre's picture
Aurelien Navarre
Points: 21

Hi Jason,

Drupal 8 introduces the 'sync' directory which is typically located under /sites/SITENAME/files/config_HASH/sync - As you can see, this default configuration management directory exists under your 'files' directory. The problem with that is we can't track configuration exports under version control.

As such, we've introduced a new 'vcs' directory which is a sibling of 'docroot' on the platform. This allows for configuration management exports to be tracked under version control. On Acquia Cloud though, your deployed branch/tag is set to read-only, so it's by design that you can't modify any file nor export your configuration to the 'vcs' directory. However, any file committed to this directory when you're working locally would be tracked under version control without any issue.

That being said, we have another convenient solution! Just use Livedev. This will allow any non-production environment (dev or staging) to be set to a read-write mode and thus allow you to run your configuration export as needed. Just make sure to invoke Drush with the corresponding Drush alias for Livedev. Your command would thus become:

$ drush @d8sandboxxx2.dev.livedev config-export

We've extensively detailed this process (and our preferred workflow) here.

I hope I've clarified everything for you now, so I'm going to close this one out. Please feel free to reopen if there's any further assistance you need with this.

Happy D8!

Status Change: 
Resolved
wmusgrove@arcbtech.com's picture
wmusgrove
Points: 1

I don't mean to hijack Jason's post, but I'm having a similar issue with config-export not working as outlined on this documentation page:

I'm using Dev Desktop locally, but am trying to export the configuration from my PROD site to my DEV site.

I am able to "ssh" into both my PROD and DEV site successfully, so I know there's not a problem with my ssh keys. I am also able to run drush commands against both PROD and DEV, using their corresponding @custom_site.prod and @custom_site.dev.livedev Drush aliases. It's just that I get "Permission denied (publickey)" errors and "rsync" errors when running this command as outlined on Acquia's documentation page:

MYUSER@MYCOMPUTER MINGW64 ~/Sites/devdesktop/custom_site/docroot $ drush config-pull @custom_site.prod @custom_site.dev.livedev --label=vcs
Starting to export configuration on Target. [ok]
Enter passphrase for key '/c/Users/MYUSER/.ssh/id_rsa':
Configuration successfully exported to /home/custom_site/drush-backups/config-export/20170202211846. [success]
Starting to rsync configuration files from @custom_site.prod to @custom_site.dev.livedev. [ok]
Enter passphrase for key '/c/Users/MYUSER/.ssh/id_rsa':
You will delete files in custom_site.dev@staging-server.prod.hosting.acquia.com:"/mnt/gfs/custom_site.dev/livedev/docroot/%%/mnt/gfs/custom_site/dev/livedev/docroot/../config/default" and replace with data from custom_site.prod@web-server.prod.hosting.acquia.com:/home/custom_site/drush-backups/config-export/20170202211846/
Do you really want to continue? (y/n): y
You will delete files in /cygdrive/C//Users//MYUSER//AppData//Local//Temp/drush_tmp_1486070388_5893a274b3860 and replace with data from @custom_site.prod:/home/custom_site/drush-backups/config-export/20170202211846/
Do you really want to continue? (y/n): y
Permission denied (publickey).
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [Receiver=3.0.8]
Could not rsync from @custom_site.prod:/home/custom_site/drush-backups/config-export/20170202211846/ to /cygdrive/C//Users//MYUSER//AppData//Local//Temp/drush_tmp_1486070388_5893a274b3860 [error]
You will delete files in @custom_site.dev.livedev:"/cygdrive/C/Users/MYUSER/Sites/devdesktop/custom_site/docroot/%%%%%%/cygdrive/C/Users/MYUSER/Sites/devdesktop/custom_site/docroot/../config/default" and replace with data from /cygdrive/C//Users//MYUSER//AppData//Local//Temp/drush_tmp_1486070388_5893a274b3860/20170202211846
Do you really want to continue? (y/n): y
Could not rsync from /cygdrive/C//Users//MYUSER//AppData//Local//Temp/drush_tmp_1486070388_5893a274b3860/20170202211846 to [error]
@custom_site.dev.livedev:"/cygdrive/C/Users/MYUSER/Sites/devdesktop/custom_site/docroot/%%%%%%/cygdrive/C/Users/MYUSER/Sites/devdesktop/custom_site/docroot/../config/default"
Permission denied (publickey).
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8]
Config-pull rsync failed. [error]
Status Change: 
Unresolved