# Season Pass Backup Failure



## jjjeffr (Dec 4, 2005)

I just re-zippered my HDVR2 running 6.2a tonight. As part of the install, I answered that I wanted Season Pass Backups. After the install was done, I checked the /seasonpass_backups directory, but there was no backup there. 

Next, I attempted a manual executiono of the script commands, 

cd /TivoWebPlus; sh backup_run.sh;

Which produced the following error:

The backup will be written to /seasonpass_backups/backup
invalid command name "init_index"
while executing
"init_index"
(file "backup_write_static.tcl" line 106)
mv: /seasonpass_backups/backup: No such file or directory


This machine is running TivoWebPlus 2.1.b2. It is interesting that the season pass backup within TivoWebPlus webserver does work. I would prefer to get the batch process to work so that I can copy the backups off of the Tivo.

I attempted the same script on one of my other machines with an older install. I don't remember how long ago I set it up. It is running TivoWebPlus v1.1-pre2 with mods. On this machine, the zipper season backup works fine.

If there is other information needed for debugging please let me know.

Thanks in advance.


----------



## rbautch (Feb 6, 2004)

Look at start.sh to see how the backup script is set up and run. You have to be in the right directory to run it.


----------



## jjjeffr (Dec 4, 2005)

I am at a loss. I have not modified the stock scripts. If a run the commands at the command prompt, I get the same error.

Backups from within TWP work.


----------



## rbautch (Feb 6, 2004)

It's not meant to be run as a standalone script, since it's just as easy to do it from TWP. The enhancement script sets it up to run as a cron job to make regular unassisted backups without user intervention. Here is what the start.sh script does to set it up:

```
echo "31 9 * * 1 cd /TivoWebPlus; sh backup_run.sh; echo \`date\` season pass backup made >> /var/log/cronlog-main" >> /enhancements/varhacks/spool/cron/crontabs/root
  		echo "" >> /enhancements/varhacks/spool/cron/crontabs/root
  		echo "# Delete season pass backups every month to save on space" >> /enhancements/varhacks/spool/cron/crontabs/root
  		echo "29 9 1 * * mount -o remount,rw /; rm -r /seasonpass_backups; ro" >> /enhancements/varhacks/spool/cron/crontabs/root
  		echo "" >> /enhancements/varhacks/spool/cron/crontabs/root
  		echo "# End of crontab" >> /enhancements/varhacks/spool/cron/crontabs/root
```
Note that it's expecting the backup_run.sh script to be in the /TivoWebPlus directory, and for it be run from there.


----------



## jjjeffr (Dec 4, 2005)

I understand that it is not normally meant to run as a standalone script. My quest started when I noticed that the entry that is in cron is NOT creating any backups in the season pass backup directory. I would like the entries in the crontab to work. In order to attempt to find out what was happening, I was attempting to execute the commands manually. So after making sure that the filesystem is in readwrite state, having changed to the TivoWebPlus directory, and then running the backup_run.sh script I received the following error messages:

The backup will be written to /seasonpass_backups/backup
invalid command name "init_index"
while executing
"init_index"
(file "backup_write_static.tcl" line 106)
mv: /seasonpass_backups/backup: No such file or directory


I appreciate the work that you have done on your scripts and all the packaging all the great Tivo utilities. I just really wish I could get this to work. 

Thanks for any help that you can provide.


----------



## Luv2DrvFst (Nov 7, 2005)

Was there ever a resolution to this? I just did a completely new install of the zipper and the enhancement script and I am receiving the exact same error messages (and no season pass backups are being made via cron).


----------



## Luv2DrvFst (Nov 7, 2005)

Giving this thread a bump. I did a little digging to find out what was happening.

There is a problem between the enhancement script's season pass backup utility that is executed via cron and TWP v2.1. 

The cron job runs but no season pass backups get made. If you execute the command at bash this is the error:

jkTiVo-TiVo# cd /TivoWebPlus; sh backup_run.sh
The backup will be written to /seasonpass_backups/backup
invalid command name "init_index"
while executing
"init_index"
(file "backup_write_static.tcl" line 106)
mv: /seasonpass_backups/backup: No such file or directory

In backup_write_static.tcl there is this code:

# Load up the channels
source "libs/index.itcl"
init_index

So it's looking for proc init_index in libs/index.itcl -- however, there is no such proc anymore. In version 2.0 it's there, but in reading BTUx9's notes there has been a fairly substantial rewrite in v2.1 of index.itcl, especially the channels section, that has eliminated that proc. I poked around but couldn't see a quick fix.

In the meantime I guess I'll stick to manual backups via TWP, but for anyone else out there running TWP v2.1 beware that your season passes are not getting backed up via cron.


----------

