Fresh install: Acquia Drupal Version Control Repositories (SVN/Git/Bzr)

Acquia Drupal in version control repositories

Maintaining your site from a version control repository can help your code maintenance workflow. Acquia Drupal is available from three repositories:

Acquia Drupal's Bzr repository is located at: https://code.launchpad.net/~acquia/drupal/1.x-6.x. If you use use Bzr, get a copy with this command:

bzr branch lp:~acquia/drupal/1.x-6.x

Acquia Drupal's Git repository can be cloned with this command:

git clone git://git.acquia.com/drupal/branches/1.x-6.x.git

Acquia Drupal Subversion (SVN) repository - overview

Installing and maintaining Acquia Drupal websites from Acquia's SVN repository is much faster and more reliable than maintaining them by hand. This is because the SVN repository marks all the files it installs and can then make the exact changes needed to the code to update those files.

Learn more about Subversion

The following instructions are limited to a few basic command line commands for installing and updating Acquia Drupal from Acquia's SVN repository. Subversion is, however capable of much more. A great resource for learning more about SVN can be found at: http://svnbook.red-bean.com/en/1.5/.

Installing SVN and SVN GUI clients - For more information on applications that can help you manage SVN repositories, see also the Managing SVN - Options and Applications section of this guide.

Installing Acquia Drupal using Acquia's SVN Repository

These instructions assume you are familiar with basic Drupal, web and server use and that you are comfortable working on the command line.

  1. Database ready - You need to have a database, database user and password ready for your new site, just as in any Drupal installation process. More on creating your database here: Install AD from Scratch: Create Database.
  2. Login to your server using your own credentials and domain name:

    ssh -l username example.com
  3. Navigate to your [docroot] directory:

    cd [docroot]
  4. Download latest version of Acquia Drupal to server: - Don't forget the "." at the end of this command!

    
    
  5. Create required Drupal files, fix permissions

    mkdir ./sites/default/files
    touch ./sites/default/settings.php
    chmod a+rw ./sites/default/settings.php
    chmod a+rwx ./sites/default/files
  6. Install website - Navigate to http://example.com/install.php (substituting your own domain name for "example.com") in your browser to kick off the Drupal installation process.

Updating Acquia Drupal using the SVN Repository

Non-SVN Drupal sites - For sites installed using the non-svn version of Acquia Drupal, first convert them to the SVN codebase following the instructions in the Advanced SVN use section of this guide.

Update an Acquia Drupal site installed using the SVN repository - Updates are where SVN really shows its strengths. SVN performs seamless critical code updates, so there's no more manual checking of versions or forgetting a file or module. Use the following command:

  1. Update your codebase - When you are informed about a new release of Acquia Drupal, navigate to the [docroot] directory on your server and enter the following command:

    svn up
  2. Run the database update script by navigating to http://example.com/update.php (substituting your own domain name for "example.com") in your browser and following the instructions presented to you.

In a single command, SVN has just performed the following actions for you:

  • Get new code
  • Delete obsolete code and files
  • Replace obsolete code and files with new versions
  • Add any new files to the site codebase
mikeybenson's picture
Michael Benson

I just started svn with this

Posted on May 27, 2009 - 3:16pm by Michael Benson.

I just started svn with this tutorial. I'm really excited about streamlining my updates! Thanks!

amitgoyal's picture
Amit Goyal

It's great way of updating

Posted on July 8, 2009 - 6:03am by Amit Goyal.

It's great way of updating Acquia Drupal on your local system!

elijah's picture
Elijah Lynn

If anyone is looking for

Posted on July 25, 2009 - 8:43pm by Elijah Lynn.

If anyone is looking for instructions on how to update an Acquia install that has not been used with SVN then go here. http://acquia.com/documentation/getting-started/fresh-install/svn/advanc...

The above "Updating Acquia Drupal using the SVN Repository" section is a bit confusing and I think it is not clear that it relies on the steps before it to work.

jam's picture
jam - Senior Wr...
Acquia Staff

Great points, thank you! I

Posted on December 9, 2009 - 4:08pm by jam - Senior Wr....

Great points, thank you! I have updated things a bit to make this clearer.

- jam | Jeffrey A. McGuire | Senior Writer, Evangelist | jam@acquia.com