In order to be able to clone an existing application, you will have to first create an empty application on a new/existing virtual machine, which is the same type as the application you wish to clone. For example, if you wish to clone a WordPress site, then you need to create an empty WordPress application.

Step 1

To do that, you will need to go to the Application tab, from the side menu and click on Create Application from the top-right corner.

You can learn more on how to create an application by giving this article a read.

Step 2

Once the new site is created you will need to take a backup of MySQL and your application. This can be done by navigating to the Virtual Machine where you have the application installed: Virtual Machine -> select correct VM -> OPS -> Backups

Scroll down to the bottom of the page and take a backup of MySQL and then a backup for your specific application.

If you wish to learn more about backup & restore, make sure to follow this link.

Step 3

Now that the backups are complete you can attempt to restore the data from the old application to the new application. Navigate to the OPS menu (left side menu) -> Backups.

You will need to restore the specific MySQL database on your new application server. To do this find the server name, expand the row (arrow on the right of the row), and select the Restore for Type Database.

When trying to restore the database first make sure that you only select the current database name in the Chose what databases you want to restore box. As for the new database name you will have to use the name of the existing database, belonging to the newly create app.

This can be found in the Overview tab of the new WordPress application.

Note: It is highly important that when you restore your database, to only select the database you wish to restore. Please be really careful and DO NOT select all, as this will overwrite all the database, therefore losing all the information you had.

The name of the database to be restored can be found in the overview tab of the original application.

Step 4

Lastly, you need to also restore your application backup. This will have to be done on the new application server, in the path of your new application, which can also be found in the Overview tab, as seen below.

The difference is that you will perform the restore operation of a Application Type.

Step 5

Restoring the application files will also overwrite your new application configuration files and the file permissions.

The permissions are set using the chown -R command via SSH. Please take great care when you run it as you can accidentally set the wrong user.

For example you would SSH the new Application VM and issue commands similar to the following:

sudo su

cd /var/www/application_name/app

chown -R sftp_username:sftp_username *

Please make sure that you use the application name and application path from the Overview! If you need more details on how to do this step please read through our article on solving permission issues.

After restoring the files, manually set the application database name, username and password to the newly created application database credentials found in the Overview page. You can use FileZilla or SSH to achieve this.

For example, in the case of WordPress you will have to edit the wp-config.php file and add the correct database, username and password, since they will have been overwritten.

Note: Some applications have the url stored in their database. Since this is application dependent please refer to your application documentation on how to alter those parameters.

Some more useful information can be found on this Wordpress article or this Magento article, which teaches you how to change magento base URLs.

Did this answer your question?