The Movable Type User Manual

NOTE: This documentation is for Movable Type 3.2. If you are using a newer version, please see the documentation for Movable type 3.3x or Movable Type Enterprise.

« Backup/restore your MySQL database | Up | Backup/restore your BerkeleyDB database »

Chapter 1: Installation and Upgrade

Backup/restore your SQLite database

Backing up your database is an essential part of a healthy Movable Type maintainance schedule and critically important any time you endeavor to upgrade your system.

Downloading your database

Since the SQLite database is a simple file, backing it up is as easy as downloading it and saving it to a safe place. The file path and name is listed in mt-config.cgi just in case you forgot. Just make sure to download it in your FTP software's binary mode.

Command-line backups

If you have shell access, you can simply make a dated, compressed copy of your database with the following command:

tar cvfz `date +%Y%m%d`_mtdb_bkup.sql.tar.gz DATABASE

Just replace DATABASE with the path and filename of your SQLite database. Because the backup archive is dated, this is an excellent way to set up a cron job on your system to achieve regular backups.

Command-line restore

To restore the files from the archive, you execute the following:

tar xvfz ARCHIVE.tar.gz

...where ARCHIVE is the archive file that contains your database. This will recreate the directory and files of your original database.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or question. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.