Doctrine PHPCR Functionality

Exporting PHPCR content is courtesy of the amazing Doctrine PHPCR-ODM

Which PHPCR Workspaces do we have?

$ bin/adminconsole doctrine:phpcr:workspace:list
The following 2 workspaces are available:
default
default_live

Exporting our PHPCR content

We can run the following command to export from base content path of '/cmf' to a file called 'export_to_filename.xml'

$ bin/adminconsole doctrine:phpcr:workspace:export -p /cmf export_to_filename.xml

Use Case

As I write articles on production environment there may be times where I wish to pull down this content into the local development environment thus removing the need for the recreation of production content on dev.

On the basis that we have SSH access to production and a PEM identity file we can SFTP from our local development environment to download the PHPCR XML content.

$ sftp -i /identity/file.pem user@127.0.0.1:/remote/path/to/file.ext /local/path

Back to Resources