Taking back up
- Take a back up of current site - database and installation directory.
- Disable clean urls before taking back ups.
- For database back up one may use phpmyadmin or mysqldump.
- Test your back ups by running them on same/another machine.
Moving to a new server / location
- Import your database at a new location.
- Change database url/ connection string in the seettings.php (Drupal 4.7+) or conf.php (Drupal 4.4-) file.
- Change base url, RewriteRules? in .htaccess file.
- In case of multisite installation configuration file is named as server and host.
- Enable clean urls.
Database backup and restoring
There are many GUI tools available like phpmyadmin for taking backups, and restoring (import/export) database. It can also be done using command line tools such as mysqldump and musqlimport. This will included in a separate page related to mysql database.
Clean urls
One can disable/enable clean urls using administer settings of the site. I find it easier to update database entry directly. (This may bypass drupal log file).
UPDATE variable SET value = 's:1:"0";' WHERE name = 'clean_url'; DELETE FROM cache;
The value s:1:"0" indicates clean urls are disabled, and s:1:"1" means clean urls are enabled.
Rewrite Rules
This is a web server related configuration. Check ApacheNotes for more info.
Notes
- Drupal 4.4- does not adhere to PHP 4.3+ coding standards. All variables must be initialized before their use since PHP 4.3+. We can suppress these warnings, however it will fill up your logs files in several gigs/day for a heavy traffic site.
- Some hard coded links within pages/nodes may not work properly. One may create global variable and assign a base_url to it. Then use this global variable in the template file (.tpl.php) of the drupal theme as a html meta-tag <base href="$your_variable" /> . However, drupal 4.4- does not use .tpl.php files for theming purposes. I haven't still figured out an easy way for changing these links.
Reference:
- Backing up drupal site: http://drupal.org/node/22281
- Clean urls: http://drupal.org/node/5590
