Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#3762 closed defect (fixed)

MythTV database backup documentation updates

Reported by: cardoe@… Owned by: Robert Kulagowski
Priority: minor Milestone: 0.22
Component: documentation Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no


Since some tables have interdepends, it's really best to lock the tables before backing them up so you don't run into issues. It's also poor practice to tell users to specify their password on the command line since this password is stored in your shell's history and stays in the ps aux for the life of the dump run. The password prompt occurs on STDERR so it does not interfere with the data dump. The -x is a tables lock, which in turn causes a write lock so when you're dumping 1 table, another can't be updated at the same time.

Section 23.5: mysqldump -l -c -p -u mythtv mythconverg> mythtv_backup.sql

It's really poor practice to grep through a mysql dump file and can result in issues in formating (as people found out in 23.7 already). Section 23.7: mysqldump -l -n -t -c -p -u mythtv mythconverg record recorded oldrecorded recordedprogram recordedrating recordedmarkup recordedseek > restore.sql

MySQL isn't always friendly to "-xntcpu" parsing in all versions. The -n -t suppress create table and create database, which is what you are trying to do with the grep statements.

Section 23.7 really should be updated with this change since it'll simply things from the user side.

Attachments (1)

fix-bad-docs.patch (2.8 KB) - added by cardoe@… 12 years ago.
simple change required to do as described in the original ticket

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by cardoe@…

I think there is something wrong with trac cause I defintely put "cardoe@…" in the reported by field. I even verified it by hitting back in my browser...

comment:2 Changed 12 years ago by danielk

Resolution: invalid
Status: newclosed

feature request without patch.

Changed 12 years ago by cardoe@…

Attachment: fix-bad-docs.patch added

simple change required to do as described in the original ticket

comment:3 Changed 12 years ago by anonymous

Resolution: invalid
Status: closednew

Unfortunately, MythTV's trac doesn't allow users to CC themselves. Due to the bug in the installation, tickets were created anonymously unless your authorization cookie was saved constantly. So there was no way for me to get any notification on this ticket at all...

(and there still is no way)

comment:4 Changed 12 years ago by danielk

Reporter: changed from anonymous to cardoe@…

comment:5 Changed 12 years ago by danielk

Reporter: changed from cardoe@… to cardoe@…

comment:6 Changed 12 years ago by paulh

Component: mythtvdocumentation
Owner: changed from Isaac Richards to Robert Kulagowski

comment:7 Changed 11 years ago by Dibblah

Status: newassigned

comment:8 Changed 11 years ago by sphery <mtdean@…>

In addition, any partial restore using the instructions at on a system properly-configured for 0.21-fixes and below (i.e. using a latin1 charset) will cause data corruption. The easiest fix for the issue (with the existing structure of the commands) is to add another grep before the others (for both the new and old-style backups):

$ grep "40101 SET NAMES " mythtv_backup.sql > restore.sql

comment:9 Changed 10 years ago by sphery

Resolution: fixed
Status: assignedclosed

(In [22258]) Updates the HOWTO sections "Saving or restoring the database" and "Changing your hostname" to use the backup/restore scripts.

Also removes the section, "Moving your data to new hardware" (partial restore instructions), as the partial restore isn't necessary (nor really recommended, anymore), when changing hardware, and is documented elsewhere (in the restore script's --help output and the wiki page).

Fixes #3762.

comment:10 Changed 10 years ago by sphery

Milestone: unknown0.22
Note: See TracTickets for help on using tickets.