Install pimcore without crushing my database



The idea where we suffered a server crash. We would like to install a new pimcore and re-import the contents of the / var folder and our existing database. So we want to launch a classic install, but the install just remove our database. Is it possible to launch an installation without overwriting our existing database? (as for the system.php file and the --ignore-existing-config option).



Why you don’t first install Pimcore and than create your own tables ?



No, I have trouble expressing myself. A customer to dockeriser Pimcore for Kubernet and OpenShift. The company imposes strict directive in terms of security, in this way, the database is remote, Pimcore is installed during the RUN of dockerfile. Our process:

We want to be able to deploy a new Pimcore to update Pimcore and our bundles, but we want all this to be done automatically, in this case 2 cases:

  1. Initialization: The database does not exist, no config file to create, we launch a classic installation, and we then install our Bundle.

  2. Case of an update of the same version: The database, we can not launch the installation and yet we must initialize Pimcore because we always start from a blank pimcore.

  3. Case of an upgrade: We are upgrading Pimcore (5.x.x to 5.y.y) so we potentially have changes to the database structure and more to pass on our database.

Today, this is what we do:

  1. Decompression of Pimcore
    2a) If BDD does not exist -> Typical installation
    2b) If BDD exists: We copy the file structure contained in profiles / empty, we copy our bundle, we install our bundle.

(Knowing that we have a persistent storage of the / var folder to keep our configuration (system.php …)

This way of doing things is not optimal, and I would like to know if there is another, cleaner way.


I’m also running Pimcore inside Kubernetes and want to know what is the best way.
I created this ticket to enable installation of Pimcore profile inside the Dockerfile.


I have a dockerfile and kubernetes configuration that does not over write the database.