pre-alpha: Season Pass / Wishlist / Logo state backup & restore tool

Discussion in 'TiVo Underground' started by angra, Jan 29, 2003.

  1. kb7sei

    kb7sei New Member

    868
    0
    Oct 4, 2001
    Salt Lake...

    Advertisements

    That worked.

    ----

    Series 171785/10 {
    Version = 1
    ServerId = ATSH446604
    ServerVersion = 0
    Genre = 375 380 105 124 141
    Title = 24
    TmsId = SH446604
    IndexPath = /Server/ATSH446604:4:0:0
    }
     
  2. agw

    agw New Member

    101
    0
    Feb 28, 2002
    Okey dokey, I can see what's going on. I've just got back in, it's very late here, so I won't be fixing it tonight :) I should have something tomorrow - if you don't mind I'll PM you a test version to try? I won't be able to reproduce your problem with my UK Tivo and so I can't test that the fix works myself, I can only test that it doesn't break current behaviour.
     
  3. kb7sei

    kb7sei New Member

    868
    0
    Oct 4, 2001
    Salt Lake...
    Sounds good. Thanks for looking into it. I'll be happy to test the fix for you.
     
  4. agw

    agw New Member

    101
    0
    Feb 28, 2002
    Version 1.00.0015 of the module is now on the server under www.boygenius.co.uk/tivo/

    This version fixes the problem that causes it to miss Series records, which could later cause a commit failed (0x30012) error during restore.

    There is also a slight change to the wording in the preamble to the restore to stop implying that the restore trace would be removed in a future version. It won't be :)
     
  5. codemonkey2k5

    codemonkey2k5 New Member

    1
    0
    Jan 2, 2005

    Advertisements

    I am trying to back up my Season pass's with version 1.00.0014 on my series 2 DirecTivo running version 4.0.01. When I click on the backup button, I get the following error. "Cannot open /usr/local/tivoweb-tcl/backups/settings"

    Any Ideas?
     
  6. kb7sei

    kb7sei New Member

    868
    0
    Oct 4, 2001
    Salt Lake...

    Is that directory writable? Many users of 4.0 on DTivo have a read-only filesystem, with the exception of /var. Telnet in a post the output from "mount".

    You should probably use the latest version as well. 1.00.0015 is out and available on the authors website. I believe it fixes a bug I found on 4.x DTivo systems, so you may be having problems with that as well after you get past opening the file.
     
  7. eschuckmer

    eschuckmer New Member

    2
    0
    Apr 29, 2005
    I am trying to do a restore using version 1.00.0015. But I get the following error.

    I have used previous versions of this module successfully. Any idea what the problem might be?

    BTW, I made sure the volume was rw accessible. And also tried reinstalling everything to the /var/hack directory. But I ended up with the same result.



    action_backup_restore_read '' 'set "fname" "/hack/tivowebplus/backups/settings";set "submit" "Load";'
    can't read "arr(1083374)": no such element in array
    while executing
    "set result $arr($station)"
    (procedure "extract_station" line 6)
    invoked from within
    "extract_station $snapshot ::snapshot_station"
    ("Series" arm line 11)
    invoked from within
    "switch -exact $restore_type {
    Series {
    set restore_fsid [agextract $restore Series]
    set snapshot_fsid [agextract $snapshot Serie..."
    (procedure "sp_matches" line 4)
    invoked from within
    "sp_matches $restore_data $snapshot_sp($snapshot_fsid) $restore_type $override_TmsId"
    (procedure "find_matching_sp" line 6)
    invoked from within
    "find_matching_sp $restore_data """
    (procedure "automap_restore_sps" line 73)
    invoked from within
    "$script"
    invoked from within
    "time {$script}"
    (procedure "agtime" line 2)
    invoked from within
    "agtime {automap_restore_sps}"
    (procedure "load_backup" line 32)
    invoked from within
    "load_backup $chan $fname"
    (procedure "::action_backup_restore_read" line 10)
    invoked from within
    "::action_$action $chan $part $env"
    ("eval" body line 1)
    invoked from within
    "eval {::action_$action $chan $part $env}"
     
  8. May 1, 2005 #168 of 251
    agw

    agw New Member

    101
    0
    Feb 28, 2002
    First off, sorry for the delay in replying!

    The function that fails is one that is checking each of the season passes and wishlists in the backup file against the ones that you already have on your Tivo. It takes a snapshot of all of the season passes and the stations that they're on and compares that snapshot against the values from the backup file.

    It looks like it's failing when it tries to get the station that a current season pass says it's on. If everything else is working, in particular if Tivoweb's routine to read the list of current stations is working, then that would mean that there's a season pass on your Tivo that is on an invalid station. That wouldn't normally happen - when Tivo delete or change stations from a lineup they usually delete any season passes that were attached to that station.

    I think the first thing to do is to figure out which season pass is causing the problem, and see if there is anything special about it. If you take a backup of the Tivo and either send the file to me (address on the web page), or PM it to me, or post it to this group, then I may be able to see which season pass is referring to a station that the backup module can't see. Having an invalid station on a season pass shouldn't (cross fingers) cause a problem when making a backup.
     
  9. dgilbert

    dgilbert New Member

    73
    0
    Sep 1, 2001
    Royersford, PA
    I’m trying to restore a backup onto a 6.2 tivo which was created on a 4.0.1b tivo. The wishlists are created correctly and the first season pass is created, then the following error occurs:
    Code:
     action_backup_perform_restore '' 'set "submit" "Restore";'
    can't read "TmkEvent::EVT_DATA_CHANGED": no such variable
        while executing
    "event send $TmkEvent::EVT_DATA_CHANGED $TmkDataChanged::SEASON_PASS $agwMap"
        (procedure "perform_restore_sps" line 35)
        invoked from within
    "perform_restore_sps $chan"
        (procedure "::action_backup_perform_restore" line 14)
        invoked from within
    "::action_$action $chan $part $env"
        ("eval" body line 1)
        invoked from within
    "eval {::action_$action $chan $part $env}"
    If I repeat the restore, the next sp will be created and then the error. Has anyone else had this problem?
     
  10. ThurstonX

    ThurstonX New Member

    70
    0
    Jan 28, 2005
    VA
    Yeah, I had the same prob. Per the general suggestion on the "other" forum for 6.2 support of dealing with tcl scripts, I commented out all lines (may have been only one) that contain "TmkEvent" re-ran it and the mod worked fine.

    The following may or may not be relevant:
    After inserting all my backed up TMFs, 6.2 doesn't recognize that they are there to the extent that a season pass will record the same show again as if it weren't there. All inserted shows play fine. Haven't asked about this yet, but I imagine it's something to do with those missing "TmkEvent" calls ms_ftp (again, the only way to get it to work), and *not* a prob with this mod.

    Just had to throw it out there ;-)

    HTH.

    Hmmmm, better change that sig :)
     
  11. dgilbert

    dgilbert New Member

    73
    0
    Sep 1, 2001
    Royersford, PA
    ThurstonX and agw,
    Thanks for your quick responses. I commented out the event call and the backup module worked perfectly with only one minor issue. Without the event call, the tivo does not seem to process all the new SPs (the To Do List remained empty). I'm not sure if this would have resolved itself eventually, but I did a re-order of the SPs (moved one item up and down in priority) and this forced the tivo to reanalyze all the SPs. After that, the To Do List was filled and everything was fine. Thanks again!
     
  12. agw

    agw New Member

    101
    0
    Feb 28, 2002
    I've uploaded a test version of the backup module that ignores the event errors to

    http://www.boygenius.co.uk/files/backup-15a.zip

    It should behave as per normal with old Tivo's and still work with the new ones that don't like the event call. If someone with a 6.2 Tivo could give it a go and check that it works then I'd be grateful.

    This version addresses another problem that someone wrote to me about a while back. Season passes with TuningPreferences attached couldn't be restored. As far as I can tell these record your choice concerning which language a program is recorded in. TuningPreferences are keys to other items in the database and, because previous versions of the module didn't know what the key pointed to, they would have refused to restore passes that had TuningPreferences (the module doesn't restore season passes that have keys to items it doesn't know about).

    Unfortunately the UK is unlikely to ever have TuningPreferences. I don't want to write code to save and restore TuningPreferences if I can't ever test it. Given this, and given that they seem to be pretty much optional, I just remove the TuningPreferences from the season pass when restoring it.
     
  13. tivoupgrade

    tivoupgrade Sponsor

    2,494
    0
    Sep 27, 2000
    Chicago, IL...
    It seems to work fine on 6.2. Can you please elaborate on the code you added/modified to handle the events (I am looking through the mod right now) as I'm interested in making similar modifications to other modules within TiVoWebPlus to ignore the EVT_DATA_CHANGED issues on 6.2.

    Thx
     
  14. Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    I'm running v1.00.0015 on my UK SA Tivo (S/W 2.5.5) and often seem to be getting a reboot when backing up season passes. Once the Tivo has rebooted, the backup works fine. If I then leave it a while (a couple of weeks say), Tivo reboots the next time I try and backup. I don't have any other problems with Tivo rebooting. I also don't recall having this problem previously.

    Is anyone else having this problem or have any ideas what might be causing it?

    Thanks.
     
  15. agw

    agw New Member

    101
    0
    Feb 28, 2002
    Thanks for testing it - I'll update the version number and put it onto the site within the next couple of days.

    To stop the event error I just made the call within a catch block to suppress the error on 6.2. So the line

    Code:
    event send $TmkEvent::EVT_DATA_CHANGED $TmkDataChanged::SEASON_PASS $agwMap
    becomes

    Code:
    catch {event send $TmkEvent::EVT_DATA_CHANGED $TmkDataChanged::SEASON_PASS $agwMap}


    Tivoweb is probably running out of memory. When it runs out of memory it reboots the Tivo. The backup module is a memory hog, it sets up a whole pile of arrays in store when it does a backup or a restore and those eat up memory. They get released when it's finished doing the backup or restore but in this case it doesn't look like there's enough store left to get that far. The reboot won't hurt a restore, you can just restart it and it'll pick up where it left off, but it'll stop the backup from completing.

    You can work around it by increasing the amount of store that Tivoweb allocates for itself. You can do this by editing tivoweb in the tivoweb directory and changing the line export TIVOSH_POOLSIZE=2916352 to export TIVOSH_POOLSIZE=3244032, and then restarting tivoweb.
     
  16. Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    I thought that may be the case. Thanks for the tip; I'll make the changes and see how things go.
     
  17. Jun 1, 2005 #177 of 251
    agw

    agw New Member

    101
    0
    Feb 28, 2002
    New version on the website - www.boygenius.co.uk/tivo/ - this one suppresses the event handling error under 6.2 and ignores TuningPreferences when restoring season passes.
     
  18. Aug 8, 2005 #178 of 251
    davidlallen

    davidlallen New Member

    16
    0
    Jul 2, 2005
    I have downloaded backup 1.00.0016 and I am planning to include it in tivowebplus 1.2.1 when it is released. However, I have never used backup before, and when I test it on my TCD 540 with software version 7.1, it does not appear to work:

    Code:
    Taking snapshot of season passes - please wait
    INTERNAL SERVER ERROR
    --cut here--
    action_backup_create_write '' 'set "fname" "/var/davea/tivowebplus/
    backups/settings";set "submit" "Create";'
    can't scan path (TV_NM_NAME_NOT_FOUND)
        while executing
    "mfs scan $dirName -start $prefix -count $count"
        invoked from within
    "if { [catch {mfs scan $dirName -start $prefix -count $count} batch] } {
          global errorCode errorInfo
          if { $errorCode == "errNmNameNotFound" ..."
        ("uplevel" body line 2)
    [...]
    "take_snapshot_theme 1"
        (procedure "take_snapshot_for_backup" line 3)
        invoked from within
    "take_snapshot_for_backup"
        (procedure "create_backup" line 18)
        invoked from within
    "create_backup $chan $fname"
        (procedure "::action_backup_create_write" line 9)
        invoked from within
    "::action_$action $chan $part $env"
        ("eval" body line 1)
        invoked from within
    "eval {::action_$action $chan $part $env}"
    
    Any thoughts?
     
  19. Aug 8, 2005 #179 of 251
    agw

    agw New Member

    101
    0
    Feb 28, 2002
    The line that it's going over on isn't in my code, it's in something I'm calling. Unfortunately the actual call is hidden somewhere in the "[...]" bit in the dump, but my guess would be this line, which is called in the last of my functions listed in the dump:

    ForeachMfsFileTrans fsid name type "/Theme" "" 20

    I'm guessing that in version 7.1 Tivo changed the name of the wishlists table in MFS to something else.

    This line was copied from a function in ui.itcl called action_wishlists, which presents a table of wishlists to the user. Did ui.itcl have to change to cope with version 7.1 and, if so, what did it change to?
     
  20. Aug 8, 2005 #180 of 251
    davidlallen

    davidlallen New Member

    16
    0
    Jul 2, 2005
    Well, the good news is the latest ui.itcl has the same Foreach.../Theme line as your code. The bad news is, that code doesn't work either in 7.1. The wishlist button fails with a similar traceback; it starts with TV_NM_NAME_NOT_FOUND and has the Foreach.../Theme line in the middle. I have searched over in ddb for TV_NM_NAME_NOT_FOUND and the only reference is to a bug in index.itcl which was for a different problem.

    I don't know quite enough about mfs to find out what the corresponding name is now; can you help, or point me at specific links where I can learn more?
     

Share This Page

spam firewall

Advertisements