Backup your database

From MythTV Official Wiki
Revision as of 19:58, 19 September 2006 by Jake (talk | contribs) (Quick HOWTO backup the database.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Before making any changes that may cause problems (such as upgrades), you should always back up your MythTV database.

The mysqldump command

$ mysqldump -u <myth_user> -p <myth_db_name> > mythdatabase.bak
Password: <myth_password>

Be sure to replace <myth_user>, <myth_db_name>, and <myth_password> with the appropriate values.

The resulting file is a plain text file that can be fed to the mysql command in order to restore a database. This file can, and should, be copied to another machine in case something really bad happens and the entire disk needs rebuilt.