<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
------------------------------<br>
<br>
Message: 14<br>
Date: Wed, 16 Jun 2010 13:27:26 -0400<br>
From: "Michael T. Dean" <<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>><br>
Subject: Re: [mythtv-users] recording name does not match database<br>
To: Discussion about mythtv <<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>><br>
Message-ID: <<a href="mailto:4C19097E.50001@thirdcontact.com">4C19097E.50001@thirdcontact.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 06/16/2010 05:03 AM, F P wrote:<br>
> I have a mythbuntu 9.04 64bit working installation.<br>
> For several reasons I had to reinstall from scratch, still 9.04 64bit.<br>
> Before doing that, I did run the backup script <a href="http://mythconverg_backup.pl" target="_blank">mythconverg_backup.pl</a><br>
> as suggested here, on the mythbuntu upgrading page.<br>
> After 9.04 reinstallation, I stopped the backend, drop the database,<br>
> created a new one and finally restored the database with the twin<br>
> script <a href="http://mythconverg_restore.pl" target="_blank">mythconverg_restore.pl</a>.<br>
><br>
> All recordings are there, as well as channels ids and so on.<br>
> But the recordings point to the wrong filenames!<br>
> It seems somewhere in the process of backup/restore, the database was<br>
> converted from "numbered filenames" to "pretty filenames".<br>
> For instance, a "dr house" manual recording previously pointing to<br>
> "1000_20100613211000.mpg" now points to a file named "dr house (Manual<br>
> Record) - 2010-06-13, 9-10 PM - Sun Jun 13 21-10-00 2010.mpg".<br>
><br>
> Is there any way I can rebuild the correct links between the database<br>
> and the real files?<br>
><br>
> I've tried renaming a file to the name the database expects, and it<br>
> works, but doing that for 100+ recordings drives me crazy!!!<br>
<br>
MythTV doesn't do any file renaming (as part of normal usage or<br>
upgrades/backups/...). The deprecated <a href="http://mythrename.pl" target="_blank">mythrename.pl</a> script used to do<br>
so, but it has been replaced by a new script <a href="http://mythlink.pl" target="_blank">mythlink.pl</a>, which only<br>
allows creating pretty, human-readable symlinks to recording files. We<br>
explicitly removed the ability to rename files because of the problems<br>
it causes (with file name length limitations imposed by the file system,<br>
file system or OS file name reserved character differences, character<br>
encoding issues, etc.).<br>
<br>
Therefore, the only way you could have a backup with file names that do<br>
not match your recording files (assuming only MythTV-related programs<br>
ever touched the database) is if someone ran <a href="http://mythrename.pl" target="_blank">mythrename.pl</a> (the old,<br>
deprecated script) after the backup was created (and used a really<br>
messed up format specifier).<br>
<br>
I don't see much of any way to fix the issue other than manually<br>
renaming the files (while it's easy to determine the proper file names,<br>
determining the current file names and how they relate to recorded<br>
program entries is much more challenging). You can use the following<br>
query to get some information, which you could open in a spreadsheet<br>
program and use to figure out which file is for which recording.<br>
<br>
cat<< "EOF" | mysql -u mythtv -p mythconverg 2>&1 | tee ~/recordings.txt<br>
SELECT title, subtitle, chanid, starttime, endtime, basename<br>
FROM recorded;<br>
EOF<br>
<br>
Mike<br></blockquote></div><br>Mike, thank you very much for your answer and your query.<br>I'll test it this evening.<br>I can assure you that nothing has been run beside the backup script: I am the only one touching the system and I did all the operations one after the other, in the same evening...<br>
<br>To summarize the sequence of operations I did:<br>Mythbuntu 9.04 working (with "numbered" names) --> <a href="http://mythconverg_backup.pl">mythconverg_backup.pl</a> --> upgrade to Mythbuntu 9.10 (went wrong) --> installation from scratch of Mythbuntu 9.04 (preserving /home and /var/lib/mythtv) --> dropDB/createDB/<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> --> database is there and populated but the filenames in the db are long and pretty, while the recordings files themselves are still with the numbered names.<br>
<br>Any more suggestions?<br>Francesco<br>