Upgrading Drupal sites

This is a very rough outline of my approach to updating Drupal sites. Note that it assumes both that no core files have been customized and that you have command-line access to a Unix or GNU/Linux system.

1. Set up a working directory (or use an existing one)

mkdir drupal_upgrade

cd drupal_upgrade

2. Download and untar the new version(s) of Drupal

wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.4.tar.gz

tar xvf drupal-4.7.4.tar.gz

3. Back up the relevant databases (dump each one, or use a script* to dump the whole lot)

mysqldump -u LOGIN -p DATABASE > DATABASE_DATE.sql

4. Back up the relevant Drupal directory tree

tar czvf dm_47_bak.gz /home/dm_47/*

5. Copy the files (including .htaccess) into the live directory

cp -rv drupal-4.7.4/* /home/dm_47

cp drupal-4.7.4/.ht* /home/dm_47

6. Test the new site, restore from backups if something is borked

 

*The attached script will back up all the MySQL databases: save it in a file, put the correct values in for the login, password, and target directory, and run it from the command line. If you save it as db_backup.sh, it can be run using the command 'bash ./db_backup.sh' (or just by typing './db_backup.sh', if you set it to be executable with the command 'chmod 770 db_backup.sh').


Section: 


Attachment Size
db_backup.txt 525 bytes


Add new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.