<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: &quot;Michael T. Dean&quot; &lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt;<br>
Subject: Re: [mythtv-users] recording name does not match database<br>
To: Discussion about mythtv &lt;<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:4C19097E.50001@thirdcontact.com">4C19097E.50001@thirdcontact.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 06/16/2010 05:03 AM, F P wrote:<br>
&gt; I have a mythbuntu 9.04 64bit working installation.<br>
&gt; For several reasons I had to reinstall from scratch, still 9.04 64bit.<br>
&gt; Before doing that, I did run the backup script <a href="http://mythconverg_backup.pl" target="_blank">mythconverg_backup.pl</a><br>
&gt; as suggested here, on the mythbuntu upgrading page.<br>
&gt; After 9.04 reinstallation, I stopped the backend, drop the database,<br>
&gt; created a new one and finally restored the database with the twin<br>
&gt; script <a href="http://mythconverg_restore.pl" target="_blank">mythconverg_restore.pl</a>.<br>
&gt;<br>
&gt; All recordings are there, as well as channels ids and so on.<br>
&gt; But the recordings point to the wrong filenames!<br>
&gt; It seems somewhere in the process of backup/restore, the database was<br>
&gt; converted from &quot;numbered filenames&quot; to &quot;pretty filenames&quot;.<br>
&gt; For instance, a &quot;dr house&quot; manual recording previously pointing to<br>
&gt; &quot;1000_20100613211000.mpg&quot; now points to a file named &quot;dr house (Manual<br>
&gt; Record) - 2010-06-13, 9-10 PM - Sun Jun 13 21-10-00 2010.mpg&quot;.<br>
&gt;<br>
&gt; Is there any way I can rebuild the correct links between the database<br>
&gt; and the real files?<br>
&gt;<br>
&gt; I&#39;ve tried renaming a file to the name the database expects, and it<br>
&gt; works, but doing that for 100+ recordings drives me crazy!!!<br>
<br>
MythTV doesn&#39;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&#39;t see much of any way to fix the issue other than manually<br>
renaming the files (while it&#39;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&lt;&lt; &quot;EOF&quot; |  mysql -u mythtv -p mythconverg 2&gt;&amp;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&#39;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 &quot;numbered&quot; names) --&gt; <a href="http://mythconverg_backup.pl">mythconverg_backup.pl</a> --&gt; upgrade to Mythbuntu 9.10 (went wrong) --&gt; installation from scratch of Mythbuntu 9.04 (preserving /home and /var/lib/mythtv) --&gt; dropDB/createDB/<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> --&gt; 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>