|Drupal is a is database driven (MySQL and PostgreSQL) content management system, which supports pluggable modules that enable additional behaviors. It is considered to be an excellent platform for developers due to its clean code and extensibility, and it can also be used as a Web application framework.
The modules available for Drupal provide a wide assortment of features, for example:
More information about Drupal can be found at: http://drupal.org
- locale support
- theme support
- content rating
- taxonomy support
- mailing list management
- error logging
- discussion forums
- photo galleries
- web based administration
- user management
- content versioning
- page caching for high performance websites
The latest Drupal version can be downloaded from: http://drupal.org/project
Drupal forum can be found at: http://drupal.org/forum
Backup database and Drupal with Cygwin
This backup strategy is based on a Windows XP environment where Cygwin is installed.
This backup script uses the Cygwin "date" and "tar" tool.
Use Cygwin Setup to install these tools:
Date tool, select Category: Base, Package: coreutils.
Tar tool, select Category: Base, Package: tar.
A backup is made of the drupal database and templates. One backup file is created: <yyyymmdd>_<hhmm>.tgz
For example: 20060520_1252.tgz
Operating system used
Windows XP Home Edition Version 5.1 SP 2
MySQL 3.23.55 or higher.
- Create the following directories:
- Copy file backup_drupal_database_and_templates_with_cygwin.bat into directory C:\drupal_backup.
- Modify the batch file backup_drupal_database_and_templates_with_cygwin.bat according to your situation.
If you run this batch file manually, the following will be created:
- Open a dos window and type:
If you run this batch file several times within the same day, you will get the following: C:\drupal_backup\backup\20060520_1252.tgz C:\drupal_backup\backup\20060520_1312.tgz C:\drupal_backup\backup\20060520_1534.tgz
- This batch file can be scheduled to run daily, weekly etc.
Click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
- Double click Add Scheduled Task to start the Scheduled Task Wizard.
- Click Next in the first dialog box.
- The next dialog box displays a list of programs that are installed on your computer.
- Click folder C:\drupal_backup and file backup_drupal_database_and_templates_with_cygwin.bat that you want to schedule, and then click Open.
- Type a name for the task, e.g.: backup_drupal_database_and_templates_with_cygwin and then choose one of the following options:
- One time only
- When my computer starts (before a user logs on)
- When I log on (only after the current user logs on)
- Click Next, specify the information about the day and time to run the task, and then click Next.
Note that the information about the day and time to run the task vary depending on the selection that you made in the previous wizard dialog box. For example, if you chose Weekly, you must indicate the day of the week, the time, and if the task should run every week, every 2 weeks, every 3 weeks, and so on.
- Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
- Click Next, and then click Finish after you verify the choices that you have made.
Now backups are made on regular bases.
- To unzip and untar the C:\drupal_backup\backup\20060520_1817.tgz file:
- Open a dos window.
- Type: cd C:\drupal_backup\backup
- Type: tar xfv 20060605_1812.tgz --gunzip
- To restore the Drupal database:
- Copy .sql file to C:\Tools\mysql\bin
- Open a dos window and goto C:\Tools\mysql\bin
- Enter the following command:
mysql -u[username] -p[password] [database] < [backup_file]
mysql -uroot -pmysecret drupal < drupal_20060520_1534.sql