Ir para o conteúdo

DoliClone: Cloning a Production Dolibarr Installation to a Test Server

Projeto : Doliclone Editor : CAP-REL Versão : v1.0.7 Data :

estável anunciada há 3 anos compatibilidade declarada em English

DoliClone has been available since September 26, 2023, in version 1.0.7.

The Need

Validating an update, training users, or testing a configuration requires an environment that closely mirrors the production environment. Setting it up manually involves an SQL export, copying files via the command line, and restoring the configuration—a process that must be repeated every time the clone becomes outdated.

Two Roles, One Affair

The module can be installed on either side, and each server declares its role: source (i.e., production) or destination for cloning. The choice of destination mode cannot be reversed, and the configuration page states this before you confirm.

The source displays its synchronization address and a security key to be entered on the destination, and accepts connections only from the specified IP address. The transport relies on the REST interface module in the Dolibarr core. A connection test button verifies the connection before initiating any actions.

What Is Copied

Three checkboxes; check the appropriate ones as needed:

  • the database, backed up on the source server and then restored on the destination server;
  • all Dolibarr documents, including PDFs and attachments;
  • the installed add-ons.

Each step displays the transferred volume and the elapsed time on the screen.

After Cloning

Two actions are recommended upon completion: anonymize personal data—for a test server that does not need to store the actual customer file—and disable production mode for the Stancer payment module, so that a test does not trigger a transaction.

A warning you won't want to miss

At the end of the restoration process, the module displays the value to be entered in $dolibarr_main_instance_unique_id in the conf.php file. Without it, no encrypted data in the cloned database can be decrypted. The page clearly states this, right before the link that takes you to the cloned Dolibarr instance.

Prerequisites

Dolibarr 11 or later, PHP 7.0 or later, the REST interface module enabled, and HTTPS access between the two servers.

The module is released under the GPL v3.