Native file archive without GUI

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
dualboot
Junior
Posts: 31
Joined: Mon Oct 26, 2015 8:53 am
Great Britain

Native file archive without GUI

Post by dualboot »

I have a very old frontend/backend (0.25) which is stuffed full of a decades worth of stuff I haven't watched, but can't bear to delete !
The frontend screen never shows the menu, draws the background and then sits at 100pc CPU. I've given up on troubleshooting it now, and build a new frontend/backend.

I'd like to archive off some individual recordings, and import them to the new system. If I could use the GUI I would create native file archives, and then use mytharchivehelper on the new system to import them.

Does anyone know how I can create an archive by hand ?

Mythweb still works fine, so I can work out the file names. In fact phpMyAdmin also works so I have all the raw data I could wish for. And of course I can ssh on to the box.

If I can do it on one recording from the CLI I feel fairly confident I could hack together a script to work on a list of recordings.

Any suggestions ?
Kwisher
Junior
Posts: 58
Joined: Fri Sep 25, 2015 3:02 pm
United States of America

Re: Native file archive without GUI

Post by Kwisher »

Would this script(s) work for you?
viewtopic.php?f=2&t=1261
dualboot
Junior
Posts: 31
Joined: Mon Oct 26, 2015 8:53 am
Great Britain

Re: Native file archive without GUI

Post by dualboot »

Hi Kwisher. I did find that script when searching, but I couldn't really understand how it works (not patient enough).

I've tried another tack. I've created a native file archive on the new system to understand the format. I've then edited the archive to strip out the vast majority of the lines in the .xml file and changed the file names, and edited the date to stop it complaining about a dup. I can now re-import that archive with:

Code: Select all

mytharchivehelper -f --infile arch_test.ts.xml 

Code: Select all

$ cat arch_test.ts.xml 
<!DOCTYPE MYTHARCHIVEITEM>
<item type="recording" databaseversion="1344">
    <recorded>
        <chanid>1072</chanid>
        <starttime>2015-05-16T19:01:00</starttime>
        <endtime>2015-05-16T20:00:00</endtime>
        <title>Castle</title>
        <subtitle>Archive Test 2</subtitle>
        <description>I used mytharchivehelper</description>
        <season>98</season>
        <episode>99</episode>
        <category>Entertainment</category>
        <hostname>quiet-pc</hostname>
        <lastmodified>2015-05-16T20:17:11</lastmodified>
        <filesize>671564952</filesize>
        <basename>arch_test.ts</basename>
        <progstart>2015-05-16T19:01:00</progstart>
        <progend>2015-05-16T20:00:00</progend>
        <playgroup>Default</playgroup>
        <storagegroup>Default</storagegroup>
    </recorded>
    <channel chanid="1072" channum="72" name="YourTV" callsign="YourTV"/>
</item>
This is all with a recording already on the new box.

My next test will be to copy over a recording file from the old box with its thumbnail file and manually create an .xml file with the minimum of metadata to make the script run. If that works I'll think about how best to automate it.

QQ - can anyone advise what else in the xml file is optional without mytharchivehelper failing ?
dualboot
Junior
Posts: 31
Joined: Mon Oct 26, 2015 8:53 am
Great Britain

Re: Native file archive without GUI

Post by dualboot »

Manual test complete - I've also exported the whole of the recorded table as a file via phpMyAdmin (I'm sure there a more progamatic way to do it with mythtv python modules, but I can't find any documentation)

I'm going to work on a script that creates archives based on lines in the file. I really should remove some lines, but I have more hard drive space than brain power :)

I can then script running mytharchivehelper against the .xml files created.
Post Reply