Backup to HDD script

Advanced Discussions on Programing for & Modifying Beyonwiz Products.

Moderators: Gully, peteru

Post Reply
magicRob
Apprentice
Posts: 14
Joined: Fri Aug 29, 2008 09:10
Location: Sydney

Backup to HDD script

Post by magicRob » Fri Sep 05, 2008 11:02

Hi I'm new around here :)

Picked up a DP-P1 the other week. Discovered the limitations of it specifically lacking the ability to overflow or record to an external HDD.

Using the WizFX source / Openwiz documentation / Help from forum members, I've put together something in PHP to grab the recordings and the delete them from the BW.

Just to give you some background as to why, I'm about to go away for a couple of weeks, and well I'd like to record the AFL games over the next few weeks plus some NFL games plus whatever else I can :) I wanted a way of keeping the BW HDD as empty as possible so I didn't miss anything! :)

I have a Mac Mini connected to my TV as a semi HTPC, it also acts as my BTTV machine and I can surf the web or whatever from it. Even better is that OSX has a Unix based core... So thankfully I can schedule jobs to run whever i need them to etc etc :) So basically I'm downloading the files to the Mac Mini using the web service and putting them into a directory that's also a SMB share visible to the BW :)

If anyone wants the script I'm happy to supply it warranty free... All it does is generate two shell scripts which are executed by another that's crontabbed. It's pretty lazy programming... actually very very lazy programming, just enough to get the job done quickly without over complicating it.

When I get back from my trip I may look into building a web interface so you can do stuff to your recordings remotely!

User avatar
tonymy01
Uber Wizard
Posts: 6373
Joined: Fri Jun 01, 2007 15:25
Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
Contact:

Post by tonymy01 » Fri Sep 05, 2008 12:48

Well done. I was going to say that with a telnet mod to the Wiz, it is dead simple to move files around, but that requires modding and a way of enabling the file move (cron isn't running on the wiz by default).
Regards
Tony

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Post by peteru » Fri Sep 05, 2008 14:23

Rob,

When you get back, you may wish to contribute your efforts to http://OpenWiz.org/

If you want, we can set you up with a separate Trac project and your work can become a basis for a community effort.

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
Vatoe
Master
Posts: 140
Joined: Thu May 31, 2007 15:30

Re: Backup to HDD script

Post by Vatoe » Sat Sep 06, 2008 17:32

magicRob wrote:Hi I'm new around here :)

If anyone wants the script I'm happy to supply it warranty free... All it does is generate two shell scripts which are executed by another that's crontabbed. It's pretty lazy programming... actually very very lazy programming, just enough to get the job done quickly without over complicating it.

When I get back from my trip I may look into building a web interface so you can do stuff to your recordings remotely!
hey Rob, I just experienced this myself where I had to dump some recordings to a NAS before I went on holidays. I did by using eric's wizmac program.

Can the script be easily modified to transfer the files to a NAS rather than a Mac? I not a expert by any imagination, hence the question/request. This would be a more useful proposition for me.

cheers,

John

magicRob
Apprentice
Posts: 14
Joined: Fri Aug 29, 2008 09:10
Location: Sydney

Post by magicRob » Sat Sep 06, 2008 17:42

You can get it to send the files anywhere you want :)

Basically it generates a shell script that had a bunch of wget's in it :)

for example...

wget -O /Users/xxxxxxxx/Desktop/ABC1_Sep.2.2008_20.33/0000 http://192.168.0.80:49152/idehdd%2Freco ... wiz%2F0000

that /Users/xxxxxxx/Desktop/ can be whatever you want, provided you can path to it...

User avatar
Vatoe
Master
Posts: 140
Joined: Thu May 31, 2007 15:30

Post by Vatoe » Sat Sep 06, 2008 17:59

Ok sounds good, PM sent.

magicRob
Apprentice
Posts: 14
Joined: Fri Aug 29, 2008 09:10
Location: Sydney

Post by magicRob » Mon Apr 05, 2010 20:06

This is an old thread, but has something changed to the index.txt file? I just ran my script and it now gets 404's etc when trying to navigate to the various directories. Is the ":" character replaced with something other than a "_" ?

Code: Select all

Glass_ A Portrait Of Philip In Twelve Parts Jan.26.2009_20.28|idehdd/Recordings/ABC1_Jan.26.2009_20.28+54857.73680.tvwiz/Glass_ A Portrait Of Philip In Twelve Parts.tvwizts
NFL_ America's Game Jan.1.2010_22.25|idehdd/Recordings/ONE_HD_Jan.1.2010_22.25+55197.80700.tvwiz/NFL_ America's Game.tvwizts
NFL_ America's Game Jan.8.2010_22.25|idehdd/Recordings/ONE_HD_Jan.8.2010_22.25+55204.80700.tvwiz/NFL_ America's Game.tvwizts
NFL_ America's Game Jan.15.2010_22.25|idehdd/Recordings/ONE_HD_Jan.15.2010_22.25+55211.80700.tvwiz/NFL_ America's Game.tvwizts
NFL_ America's Game Jan.22.2010_22.25|idehdd/Recordings/ONE_HD_Jan.22.2010_22.25+55218.80700.tvwiz/NFL_ America's Game.tvwizts
NFL_ America's Game Feb.2.2010_22.55|idehdd/Recordings/ONE_HD_Feb.2.2010_22.55+55229.82500.tvwiz/NFL_ America's Game.tvwizts
NFL_ America's Game Feb.5.2010_22.25|idehdd/Recordings/ONE_HD_Feb.5.2010_22.25+55232.80700.tvwiz/NFL_ America's Game.tvwizts
Italian Food Safari Mar.18.2010_19.25|idehdd/Recordings/SBS_HD_Mar.18.2010_19.25+55273.69900.tvwiz/Italian Food Safari.tvwizts
Italian Food Safari Mar.25.2010_19.25|idehdd/Recordings/SBS_HD_Mar.25.2010_19.25+55280.69900.tvwiz/Italian Food Safari.tvwizts
Italian Food Safari Apr.1.2010_19.25|idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/Italian Food Safari.tvwizts
	idehdd/contents
So if I point my browser at:

http://<beyonwiz ip>:<beyonwiz port>/idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/Italian Food Safari.tvwizts

I get a 404.

Has something changed in the latest firmware?

The original document that I based stuff on is this: http://www.openwiz.org/wiki/Recorded_Files

magicRob
Apprentice
Posts: 14
Joined: Fri Aug 29, 2008 09:10
Location: Sydney

Post by magicRob » Mon Apr 05, 2010 21:54

Looks like a minor directory structure change since I wrote this script quite a while ago :)

Problem solvered :)

User avatar
tonymy01
Uber Wizard
Posts: 6373
Joined: Fri Jun 01, 2007 15:25
Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
Contact:

Post by tonymy01 » Mon Apr 05, 2010 22:31

And... did you wish to provide your solution for the benefit of others wondering?
Tony

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Post by prl » Mon Apr 05, 2010 22:50

magicRob wrote:This is an old thread, but has something changed to the index.txt file? I just ran my script and it now gets 404's etc when trying to navigate to the various directories. Is the ":" character replaced with something other than a "_" ?

Code: Select all

...
Italian Food Safari Mar.18.2010_19.25|idehdd/Recordings/SBS_HD_Mar.18.2010_19.25+55273.69900.tvwiz/Italian Food Safari.tvwizts
Italian Food Safari Mar.25.2010_19.25|idehdd/Recordings/SBS_HD_Mar.25.2010_19.25+55280.69900.tvwiz/Italian Food Safari.tvwizts
Italian Food Safari Apr.1.2010_19.25|idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/Italian Food Safari.tvwizts
	idehdd/contents
So if I point my browser at:

http://<beyonwiz ip>:<beyonwiz port>/idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/Italian Food Safari.tvwizts

I get a 404.

Has something changed in the latest firmware?

The original document that I based stuff on is this: http://www.openwiz.org/wiki/Recorded_Files
It's been a long time since http://<beyonwiz ip>:<beyonwiz port>/idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/Italian Food Safari.tvwizts did anything useful.

What you want to fetch is http://<beyonwiz ip>:<beyonwiz port>/idehdd/Recordings/SBS_HD_Apr.1.2010_19.25+55287.69900.tvwiz/{header.tvwiz,stat,trunc,0000,0001,...}

There's very little in http://www.openwiz.org/wiki/Recorded_Files about how to parse the index.txt file.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

magicRob
Apprentice
Posts: 14
Joined: Fri Aug 29, 2008 09:10
Location: Sydney

Post by magicRob » Mon Apr 05, 2010 23:34

Actually it was the screenshot on that page that gave it away :) The parsing of all the files is still the same.

I can't remember when I last used that script to rip data off my Beyonwiz :) Must have been ages (at least sometime around September 2008!!) :) All I know is it is slow ;) Why haven't they shoved gigabit ethernet in it already ;)

Post Reply

Return to “Software Developers”