Syncing remote Drupal 7 site with localhost

5 replies [Last post]
Last seen: 6 years 2 weeks ago
Joined: 2011-04-09

I built my Drupal 7 site on the remote server and now I want to sync it onto my local computer.

I am using WAMP on a Windows 7 system.

Is there a particular video that would cover this?


Chris Shattuck
Last seen: 5 days 13 hours ago
Joined: 2009-08-16
Hi John, There's no videos

Hi John,

There's no videos that cover this type of syncing yet, but there will be before too long. :)


Last seen: 6 years 2 weeks ago
Joined: 2011-04-09
Progress on this?

Any progress on this yet Chris?

Chris Shattuck
Last seen: 5 days 13 hours ago
Joined: 2009-08-16
Sorry, not yet, but it's

Sorry, not yet, but it's still on the docket. :)


Last seen: 6 years 10 weeks ago
Joined: 2011-07-12
Have you considered...?

Would it be possible to manipulate your file tree so that you could ftp a .git folder (created locally) above the entire site install, then git fetch ?

Last seen: 3 years 24 weeks ago
Joined: 2011-06-11
Using Git for backups.

I have a cron job that does this. The relevant bits are:


## first of all I backup the database using mysqldump

db_name="mydrupaldatabase" or whatever it is called

echo -e "drop database if exists `$db_name`;" > $db_name.mysql
echo -e "create database `$db_name`;" >>  $db_name.mysql
echo -e "use `$db_name`;\n\n" >>  $db_name.mysql
mysqldump -uroot -p<code>cat ~/passwords/mysql-root</code> --skip-extended-insert \
  --routines $db_name >> $db_name.mysql



# then we do the git bit

## avoid unwanted files i.e. the modules and themes I am working on
## for various reasons I did not want to include this in .gitignore or fiddle around in the .git directory
find . -type f \  
  | grep -v .git \
  | grep -v 'default/modules' \
  | grep -v 'default/themes' \
  | while read file_name;
  git add -f "$file_name" >/dev/null

git add -u . >/dev/null  ## remove any deleted files from the repo
git commit -m "backup commit: <code>date</code>" >/dev/null  ## commit with date
git push >/dev/null ## put it to the repo I can then pull from

Where you see the code tags above you will need to replace them with backquotes. Don't know why it did that.

I have to do a sudo chown -R frostmar:frostmar ./sites/default/files before I pull but if you are using windows this should not be a problem for you.

In the top level of the Drupal directory will be a file called mydrupaldatabase.mysql. You will need to run this into your mysqlserver with something like

mysql -p < mydrupaldatabase.mysql

Hope this helps.

If you need clarification, just say.


Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:

Contact us

Below are the supported keyboard shortcuts for our video player.

Start / stop video
Go to next video
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
Jump to a percentage (2 is 20%, for example)
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
1 month
6 months
10% off
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.