Quantcast
Channel: Enterprise Ready Global Remote Linux, Unix System Support. - Scripts Installation and Upgrade
Viewing all articles
Browse latest Browse all 7

Back up your Drupal database with MySQL

$
0
0

Back up your Drupal database with MySQL

mysqldump -u user -p databasename> drupaldatabasebackupfile.sql

...or use one of the options below:

  1. Navigate to your live site directory, and download a special script to your Drupal site folder which will backup your database to a file called 'backup.sql'. Put the backup in your 'backup' directory.
  2. cd drupal_site/
    wget -O drupalsqldump.sh "http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/drumm/tools/drupalsqldump.sh?view=co"

    chmod +x drupalsqldump.sh

    Note that the -O above is the capital letter O and not a zero.

    If you are upgrading a test site, the path 'drupal_site' would be the path to your test site.

  3. The following command will look at your Drupal settings file, automatically connect to the database, and make a backup of it.
  • If you are running a version of Drupal that is 4.6 or newer, then enter the following:

    ./drupalsqldump.sh sites/default/settings.php > backup/backup.sql


Viewing all articles
Browse latest Browse all 7

Trending Articles