Ticket #3762 (closed defect: fixed)
Opened 5 years ago
Last modified 2 years ago
MythTV database backup documentation updates
| Reported by: | cardoe@… | Owned by: | rkulagow |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | documentation | Version: | unknown |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
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
Change History
comment:1 Changed 5 years ago by cardoe@…
comment:2 Changed 4 years ago by danielk
- Status changed from new to closed
- Resolution set to invalid
feature request without patch.
Changed 4 years ago by cardoe@…
-
attachment
fix-bad-docs.patch
added
simple change required to do as described in the original ticket
comment:3 Changed 4 years ago by anonymous
- Status changed from closed to new
- Resolution invalid deleted
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:6 Changed 4 years ago by paulh
- Owner changed from ijr to rkulagow
- Component changed from mythtv to documentation
comment:8 Changed 3 years ago by sphery <mtdean@…>
In addition, any partial restore using the instructions at http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 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 2 years ago by mdean
- Status changed from assigned to closed
- Resolution set to fixed
(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.

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...