i have a site on drupal. I want to make a copy of that site so as to be able to make changes to the site without the fear of loosing something.

I have problem with the database. I export it in spl format. The size is about 100 MB. When i try to import it to the newly created database it says it is in progress but nothing is happening. The import is not proceeding.

I tried to transfer each table separately but when i reach a table that it is 36 MB (locale_sources) it shows it is in progress but nothing is happening.

Everything is done through phpmyadmin.

Can anyone suggest anything?

Thank you.

5 Answers 5


You can use mysql on the command line to avoid timeouts when updating big dbs.


mysql --password=yourpw --user=name --default-character-set=utf-8 db_name <your_dump.sql

See mysql -? or the manpage for more options.

  • so the problem is the timeouts you think?
    – tioschi
    Jul 16, 2012 at 12:14
  • The timeouts are comming from the webserver (I just assumed you try to import via phpMyAdmin). If you do the import on the command line there's no such limitation. I also noticed that the imports on the command line are much faster.
    – BetaRide
    Jul 16, 2012 at 12:18

Backup and Migrate module is a better option to perform site replication.

The features provided by this module are:

  1. Backup/Restore multiple databases.
  2. Backup to FTP/S3/Email
  3. Drush integration
  4. Multiple backup schedules
  5. AES encryption for backups
  6. Backup your files directory (with the Backup and Migrate Files module)

NOTE: Make sure you change the value of upload_max_filesize to anything >100M in your php.ini file (usually at line# 886)

  • the problem is that i don't have permission to install or modify modules. and they asked me to make a copy of a site. so i think i can't use this module.right?
    – tioschi
    Jul 17, 2012 at 10:24
  • then you can go with the solution of provided by @betaride, but you may require ftp access to modify variables like $base_url or $cookie_domain from sites/default/settings.php in you new site. Not having permission might create problems..
    – AjitS
    Jul 17, 2012 at 11:09
  • i am making a copy on the same server for testing purposes. so i don't think i have to change these. but if i want to copy it locally i would to change these values right?
    – tioschi
    Jul 17, 2012 at 11:12

If you want to avoid/or don't have access to commandline MySQL, then I suggest that you explore the export options in PHPMyAdmin. First, make sure that you are using the compression option: bzip/gzip are very good and should lead to a much smaller file. Secondly, try to avoid INSERT statements with multiple value sets - the longer the statement is, the more troublesome things get from an import POV.

In newer versions of PMA, these options should be hidden within the "Custom" export section.

  • i haven't found any option in export page that fixes the problem. i have searched almost everything.
    – tioschi
    Jul 17, 2012 at 10:26
  • Are you saying that you can't find the options to compress etc. on the export page? In 3.4.x, they should be visible if you choose the "Custom" radio button.
    – user7667
    Jul 17, 2012 at 12:49

Try big dump. I used it for importing databases of a 1-2 GB and it worked perfectly.

  • @lvanhoe123 This seems good tool. But is there any suggestion for making it manually?
    – tioschi
    Jul 16, 2012 at 11:27

Personally, I can't stand phpMyAdmin, and prefer to keep Apache out of the picture when doing database maintenance.

I prefer the MySQL GUI Tools. They are at end-of-life, but they still work well.

With these, you can take and restore backups with MySQL Admin. You can also schedule backups with it, too. The tool will restore backups taken via other methods if you tick the "Ignore Errors" option.

I wouldn't be surprised if you are getting silent "Packet too large" errors, and need to adjust max_allowed_packet. That is a frequent problem with backups on Drupal systems.

Once I have a good value set to max_allowed_packet set, I have used MySQL Admin to take and restore 2G catalogs.

It may also be worthwhile to configure your backup to include the CREATE statements for the cache tables, and the watchdog table, but not include the actual data.

Also, if you are not using it already, take a look at the Backup and Migrate module, which makes taking and restoring backups a snap, and includes the options to exclude cache and watchdog data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.