Opened 13 years ago
Closed 13 years ago
#11830 closed Bug Report - General (Invalid)
mythconverg_backup.pl in 0.27 doesn't support prior config.xml versions
| Reported by: | Owned by: | sphery | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | Contributed Scripts & Apps | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
I just upgraded to 0.27-fixes. I compile from source, so I did a make uninstall on 0.26-fixes, compiled and installed 0.27-fixes, then tried to run mythconverg_backup.pl prior to running any mythtv executable for the first time to backup the database. Unfortunately, it can't properly parse the config.xml file in my home directory. When I run the version of mythconverg_backup.pl that ships with 0.26, it works just fine.
The output from running the mythconverg_backup.pl version that ships with 0.27-fixes is:
mythconverg_backup.pl --verbose
Configuring environment:
- username: mythtv
- HOME: /home/mythtv
- MYTHCONFDIR: /home/mythtv/.mythtv
Parsing configuration files:
- checking: /home/mythtv/.mythtv/config.xml
parsing: /home/mythtv/.mythtv/config.xml
- checking: /home/mythtv/.mythtv/backuprc
parsing: /home/mythtv/.mythtv/backuprc
Applying command-line arguments.
Checking configuration.
WARNING: DBName not specified. Using mythconverg
WARNING: DBHostName not specified.
Assuming it is specified in the MySQL options file.
WARNING: DBUserName not specified.
Assuming it is specified in the MySQL options file.
WARNING: DBPassword not specified.
Assuming it is specified in the MySQL options file.
Database Information:
DBHostName:
DBPort: -1
DBUserName:
DBPassword:
DBName: mythconverg
DBSchemaVer:
DBBackupDirectory: /mythtv/DBBackup
DBBackupFilename: mythconverg-20130907213135.sql
Executables:
mysqldump: mysqldump
compress: gzip
Executing command:
'/usr/bin/mysqldump' --add-drop-table --add-locks --allow-keywords --complete-insert --extended-insert --lock-tables --no-create-db --quick --add-drop-table 'mythconverg' 2>&1 1>'/mythtv/DBBackup/mythconverg-20130907213135.sql'
mysqldump exited with status: 2
mysqldump output:
mysqldump: Got error: 1045: Access denied for user 'mythtv'@'localhost' (using password: NO) when trying to connect
Note:
See TracTickets
for help on using tickets.

After debugging on IRC, we found an old, pre-config.xml-changes mythconverg_backup.pl in the user's PATH that was being executed. The reason the 0.26-version backup script worked properly before creating the bug was because its path was specified directly (ensuring the right script was run). At this point, both 0.26- and master-/0.27-version backup scripts were confirmed to work properly.
Since make install installs the backup and restore scripts to the share dir, and not to any bin dirs, the copy of the old script in the bin directory wasn't overwritten. Users wanting to make the backup script accessible without specifying its full path may want to use a link in the bin directory to ensure they're always using the current version of the script.