Importing using Drush

To import your website to Acquia Cloud using Drush, you must create a site archive file, and then import the file to Acquia Cloud.

Creating a site archive file

  1. Verify that Drush version 4.5 or later is installed. You can download Drush from GitHub. You may need to install Composer as a prerequisite for installing Drush.
  2. 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 that it has the required permissions to save files in that directory.

  3. Copy mysite.tar.gz to your local computer.

Importing the site archive file

To import your website to Acquia Cloud, select from the following import options, depending on the size of your site archive file (mysite.tar.gz).

Site archive file smaller than 100MB

If your site archive file is smaller than 100MB, you can use the Import feature on the Cloud > Workflow page.

For more information about the Import feature, see the Install the site archive into Acquia Cloud section of Importing your website using a site archive file.

Site archive file of any size

If the site archive file is too big to upload using the Workflow page, complete the following steps:

  1. Verify that you've enabled SSH access to your Acquia Cloud server.

  2. Copy mysite.tar.gz to /mnt/gfs/[site].[env]/import on your Acquia Cloud server, using the following command:

    scp mysite.tar.gz [site]@[server]:/mnt/gfs/[site].[env]/import

    where [site] is the name of your site on Acquia Cloud, [env] is the Acquia Cloud environment (one of prod, test, or dev), and [server] is the full DNS name of the server that hosts your site.

    To find your [site] and [server] name, view the Cloud > Users and keys page:

    Sitename location

    The site name is the string before the @ sign and the server name is the string after the @ sign.

  3. Using SSH, log in to your server on Acquia Cloud.

    ssh [site]@[server]

    where [site]@[server] is the same value from step 2.

  4. Import your website using the secure connection to Acquia Cloud.

    drush @[site].[env] ah-site-archive-import /mnt/gfs/[site].[env]/↵
      import/mysite.tar.gz

    where:

    • [site] is the same value from step 2.
    • [env] is the environment you're updating. Acceptable values are dev (Development), test (Staging), and prod (Production).

After you import your site archive, you can import files to your website and check out a local copy of the website to your repository.

Related topics