A Drupal site archive is a gzip-compressed .tar file containing the following structure:
A single top-level directory containing your application’s Drupal docroot, including the index.php file, the modules and the /includes directory, and sites/*.
Cloud Platform imports your application’s user-uploaded files from the [docroot]/sites/*/files directory of the directory containing a settings.php file. For more information about docroots, see Docroot definition.
The uncompressed MySQL dump file from your Drupal application in the root of the .tar file. This file can have any name, but must have an .sql extension.
The following sample archive file shows the site archive structure of a Drupal 7 application with the tar-tzfarchive.tar.gz command that lists the contents of the .tar file:
A Drupal site archive is a gzip-compressed .tar file containing the following structure:
A single top-level directory containing your application’s Drupal docroot, including the index.php file, the modules and the /includes directory, and sites/*.
Cloud Platform imports your application’s user-uploaded files from the [docroot]/sites/*/files directory of the directory containing a settings.php file. For more information about docroots, see Docroot definition.
The uncompressed MySQL dump file from your Drupal application in the root of the .tar file. This file can have any name, but must have an .sql extension.
The following sample archive file shows the site archive structure of a Drupal 7 application with the tar-tzfarchive.tar.gz command that lists the contents of the .tar file:
Ensure that you have installed a Drush version that supports the drush archive:dump command. Certain Drush versions like Drush 9 do not support this command. For more information, see archive:dump.
Go to the Drupal directory and enter the following command:
drush archive:dump --destination=../mysite.tar.gz
Drush saves the mysite.tar.gz site archive file to the parent directory of your current Drupal directory. If the command displays error messages, ensure it has the required permissions to save files in that directory.
Copy mysite.tar.gz to your local machine.
Making the site archive file available
To import a site archive file using the Cloud Platform user interface, the file must be located at a publicly accessible URL. You can use services such as Dropbox or Google Drive, or an infrastructure you control.
Creating a site archive file with Drush
Ensure that you have installed a Drush version that supports the drush archive:dump command. Certain Drush versions like Drush 9 do not support this command. For more information, see archive:dump.
Go to the Drupal directory and enter the following command:
drush archive:dump --destination=../mysite.tar.gz
Drush saves the mysite.tar.gz site archive file to the parent directory of your current Drupal directory. If the command displays error messages, ensure it has the required permissions to save files in that directory.
Copy mysite.tar.gz to your local machine.
Making the site archive file available
To import a site archive file using the Cloud Platform user interface, the file must be located at a publicly accessible URL. You can use services such as Dropbox or Google Drive, or an infrastructure you control.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.