SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-10-2004, 09:55 AM
jimbobuk jimbobuk is offline
Sage Aficionado
 
Join Date: May 2003
Posts: 414
New version of cyclic backup of Sage config files

I'm sure most people already have this sort of thing sorted out but I find it very useful and reassuring and so having updated this slightly i thought i'd upload the new version..

Its really basic stuff but recently i've spent a lot of time at work.. as such my automated task that starts SageTV each day got reenabled on the weekends as i wasn't here.. The problem with this previously was that if i WAS at home and had ran sage myself then when my auto running of it was triggered it would perform the config file backup and god knows what that would do to Sage..

ANyways i've added a simple lock file that is created when Sage is run via this bat file... and deleted at the end of the bat file after sage has finished running... The script checks on this lockfile and doesn't do anything if the lock file already exists (ie. you've already ran it somewhere else) I've not checked it fully yet but i'm pretty sure it'll do the job

Here it is
Attached Files
File Type: txt runsagetv.bat.txt (2.1 KB, 993 views)
Reply With Quote
  #2  
Old 07-10-2004, 10:57 AM
mls mls is offline
Sage Fanatic
 
Join Date: Jun 2004
Posts: 804
I just GOTTA ask, what is your point with all those backups?

Is your system that un-stable?

SageTV makes its own backup files to start with, why have a dozen other outdated backups that quite honestly would be of no use later (since it would be totally outdated and not accurately reflect the last things/files SageTV was working with)?

Making backup copies of the wiz.bin and properties files (and their .bak's) is a good idea, but only really usefull if you need them when changing/testing different versions of SageTV (or if your system crashes every couple minutes).

Guess I don't get the point of what you are trying to accomplish?
Reply With Quote
  #3  
Old 07-10-2004, 11:39 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Many reasons... I started doing it during beta test, and haven't stopped.

The ability to step back to previous configs if you play around with adding tuners...
If the backups are to another disk, then there is disk redundancy for favourites, intelligent recording preferences, etc.
Child proofing: if someone small goes round deleting all your favourites, there are old backups...

And Sage overwrites the backup with the current wiz.bin on restart, so the backup can be easily lost...

And finally, its easy to do, and has no bad side-effects
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #4  
Old 07-10-2004, 12:02 PM
jimbobuk jimbobuk is offline
Sage Aficionado
 
Join Date: May 2003
Posts: 414
Yeah.. I had a few times where i've had to start from scratch from corrupt files... to be honest its when your forced to use epgdata XML input plugins... the most recent time when i was forced to reset was when I had invalid XML input into Sage.. it got confused and lost all my recordings, and EPG..

Basically its being a bit cautious.. no guarantees but its worked fine for me.. I've done so many backups just because its nice to have a good history... also if you play with it a lot in one day you quickly go through a good 5-6 restarts..

Also favourite information is sadly pretty useless via XMLTV input... there is no notion of shows being recorded and so not needed to be recorded again.. most of the time I'm having things rerecorded that are already in my recordings/library multiple times... saying its useless is a bit too strong of course it is useful as it WILL record stuff i like.. I do get frustrated that we're missing out on probaly 60% of Sage's intelligent recording goodness...

I really hope Sage do get the UK/Europe EPG stuff integrated sometime, I'd love to see how the other half live would even pay for the privelage..

ANyways going off topic... thats the reasons for it... may save you some time if you want it
Reply With Quote
  #5  
Old 07-10-2004, 12:41 PM
mls mls is offline
Sage Fanatic
 
Join Date: Jun 2004
Posts: 804
Sorry to hear about your XML problems, that's gotta suck. I am glad you found a way to back up things for whatever reason you have to do so. Guess I just look at it a bit different.

At this point, let's just agree that we disgree on the methods of backups.

On my end, I do things a bit differently. I have removable hard drive bays. One pair of hard drives as a functional set than I rarely have to mess with (or have any real problems with).

The other set of drives I use for any/all testing and trash to my hearts content, so I don't worry about backing up anything for that.

In fact I test everything thourghly on the 2nd set of drives before I ever consider installing it, or making other changes on the good set of drives.

Even then, I make full backups of the main good drive to another hard drive (sometimes also to a DVD) before making any changes to it.

As you can see, I have my own strange way of doing things lol. Removable hard drives sure make testing things a LOT easier without royally messing up a clean, good running system.

Makes life more intersting to be running/testing something in Win98, then 10 minutes later change to XP, then just put back the good running drives and watch TV for a few days until the next silly idea to test comes along.

Oh, and I do have a 2nd computer set up similar, so sometimes I swap drives between them too.

I know most people don't think about the many ways removable hard drives could be used and therefor don't have them. When I built my last 2 computers though I made sure both had 2 removable drive bays because things were just getting way to complicated to handle any other way with all the silly stuff I test here.

So, as I said, I'll agree to disgree on the methods of backing up stuff... assuming you will also, right?
Reply With Quote
  #6  
Old 07-10-2004, 01:18 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,595
Quote:
Originally posted by mls
So, as I said, I'll agree to disgree on the methods of backing up stuff... assuming you will also, right?
Um... what does it matter whether you agree or disagree with someone else's choice for a way to accomplish something? If it works for them & does what they want, surely it can't interfere with what you choose to do. I have a completely different backup system in place, but it all comes down to the fact that the auto-backup that SageTV creates is very easy to have overwritten & thus lost. Same thing for the other topics where people choose to do things differently from what you do: to each his own.

Sorry to get sidetracked.... I'm thinking of making an index list for the various downloadable utilities people have provided on this forum. This sounds like one I could add to the list

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #7  
Old 07-10-2004, 01:32 PM
jimbobuk jimbobuk is offline
Sage Aficionado
 
Join Date: May 2003
Posts: 414
Your kind of backing up to keep a windows system running smoothly is a good idea.. to be honest the ultimate is having a twin PC to install crap on until you are sure its worthy... I have a collection of PCs though they're not the same spec, OS, or are supposed to serve the same purpose..

I use my main PC to watch movies on via my projector, this takes quite a delicate balance to do correctly but is very rewarding at offering picture quality above anything any stand alone component i can afford can offer (and probably above that) .. it also lets me watch the Microsoft HD material which is great as we have no native HD in the UK yet (and wont for some time) .. what i'm saying is that this side of things takes a delicate set of driver/program installs... for a long time i couldn't get it right.. luckily i managed it about 6 months ago and its been pretty solid ever since... any kind of micro stutter that you get when watching a dvd on the big screen is a real hinderance to me.. only via reclock and ffdshow have i managed to eliminate it (and thanks to ffdshow increase the video quality)

I've always considered having external drives but had read about potential problems with the integrity of files transfered across them.. I'm sure thats not a general thing but it did scare me when i had my system fully die on me the few times it has done..

Understand this sage backing up process is not to be secure through any kind of PC error/crash.. its simply there to cover up if i make a mistake supplying data to it... I've already said that the favourite intelligent recording via XMLTV stuff isn't great so there isn't that much of worth on my Sage Server that I can't reset if i had to reinstall it...

My SageTv machine just sits there recording tv, thats all it does.. as such its quite stable and has little installed on it... as soon as the new 400gig drives get launched i'll be getting them and upgrading it to a full on media server where i'll put all my ripped CDs and vinyl on there in lossless format... they'll be stored on a raid system of some kind to offer some kind of fault tolerance..

You're idea of surviving faults via your external drives is a sound one.. my main machine i have backed up by an external linux machine that does rsync backups off it on a daily basis... since upgrading that machine to watercooling its only backing up weekly as i can't turn my pump on automatically yet.. will fix that soon..

I guess i'm just lazy.. the sage backing up is totally transparent.. I had some free time so i added the lock file stuff... beyond that i never have to question it, it just works.. my other form of backup when fully restored is also automatic.. my machines turn on, perform the backup and then power down... i have to do nothing to do it.. if i had to manually do the backups and rotate external hdds i'd probably be more likely to forget to do it, or make a mistake when doing when i'm tired..

Being safe about your data is a good idea.. I HAVE lost a lot of stuff due to hdds dying or corrupting.. i'm sure it'll hit me again sometime.. hopefully i'll be better prepared...

Opus4: Definately add this to your list if you want (if you can link to attached files elsewhere on the forum?!?) its not complex at all but it did take a bit of time typing in and testing.. plus i had to look up some batch commands as i tried to get something resembling a nice scripting setup (ala bash, sh etc) ...
Reply With Quote
  #8  
Old 12-19-2004, 08:49 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
Jimbobuk,

Could you explain what this script does and how to use it exactly? What is it doing when the batch file is running? Does it only backup after SageTV exits? I use SageTV service so its running all the time, so how will it backup if sage doesn't exit?
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #9  
Old 12-19-2004, 09:01 PM
jimbobuk jimbobuk is offline
Sage Aficionado
 
Join Date: May 2003
Posts: 414
This script backs up files before then running the SageTV exe ... I've not updated my Sage system for a version or two now specifically because i dont use the system that much at the moment and the idea of the sagetv service doesn't appeal to me THAT much.. i believe its optional but i've not looked into it really..

If you are running sage as a service then unfortunately you wont be able to run this script.. in fact it'd be a real bad idea to do that as it would move files around whilst sage is effectively running.. I'm hoping Sage included their own backup stuff beyond 1 level of backup when they moved across to this service centred implementation.. without i fear that a lot of xmltv users could be at risk of losing everything with an unforseen update..

To be honest its only really xmltv users that can really mess things up by supplying crap xmltv data... selfishly i'd love to hear from sage that they'd got partners for EPG data for UK and Europe so we could all stop having to rely on xmltv.. the data itself isn't bad with reasonable show descriptions etc, i'm just sick of sagetv not being smart and recording one show, and then recording the same show again an hour later on the +1 channel of the previous record..
Reply With Quote
  #10  
Old 12-19-2004, 10:52 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
Its unfortunate that frey dont have official support for epg data for the UK. Maybe licensing epg data is a more complicated or costly than it seems. Or else I don't understand why it is not included in the package. I'm in the US so I'm fortunate not having to deal with configuring my own xmltv, it would've steered me away from Sage also.

Anyway, back to the backup topic, it seems I need something more complicated to backup my config files. I need something that will check to see when Sage is idling and shuts down sagetv to backup the files, then relaunch SageTv when backup is done. Any leadways on how to do this?
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #11  
Old 12-19-2004, 11:47 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
I just whipped up a batch file that backs up the wiz.bak file so no worries of it being in use. It uses a microsoft utility called fciv.exe to compare the MD5 hash of the wiz.bak with the last time it was backed up. It is a little sloppy but it works well so far on my test client box. Use at your own risk.

UPDATED 12/24/2004
Wouldn't create backup on first day. Now does so. If you just downloaded recently and want that first backup to occur delete the toxbaks.xml file from your SageTV folder and replace the files with the 1a revision.
It now creates your backup folder for you too if you didn't create the actual folder.
Attached Files
File Type: zip ToxWizBak1a.zip (42.3 KB, 505 views)

Last edited by ToxMox; 12-24-2004 at 02:42 PM.
Reply With Quote
  #12  
Old 12-19-2004, 11:51 PM
korben_dallas's Avatar
korben_dallas korben_dallas is offline
Sage Icon
 
Join Date: Oct 2004
Location: USA
Posts: 1,250
Maniac,

I'm running Sage in service mode. Due to some problems I was having with the UI at startup, I set my SageTV service to manual, and then I wrote this little batch file, saved it in my Frey directory and put a link to it in my Startup folder:

sleep 30
net start SageTV
sleep 70
start sagetv
sleep 15
start sagetv.exe -event 44
exit

"Sleep" is a nice little utility for creating timed pauses in DOS batch files. "net start xxxxx" and "net stop xxxx" will start and stop services. "start xxxxx" tells the batch file to run the named executable and keep going (don't wait for that executable to be closed). "Exit" tells the batch file to close.

So you can easily start and stop the SageTV service, and you can power on and off the UI using events 43 & 44.

You can just borrow some lines from his batch file and mine, and you'll have an auto back that is service compatible.
Attached Files
File Type: zip sleep.zip (60.7 KB, 397 views)
Reply With Quote
  #13  
Old 12-20-2004, 04:36 AM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
ToxMox,
As I understand it, the wiz.bak is only generated when SageTV exits. So if I had SageTV running without exiting for a week, that means the wiz.bak is outdated and could have lots of changes missing if I were to use the backup when Sage corrupts the wiz.bin. Correct me if I'm wrong.

Korben,
Your method is similar to ToxMox, meaning both requiring for SageTV to be manually shutdown or a manual computer restart which will trigger the script. Is there a way to check to see when Sage is idling, meaning its running but not recording anything? I know its possible since Malore's Commercial Skip plugin checks to see when Sage is idling before it runs.

But thank you both for sharing the info.
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #14  
Old 12-20-2004, 06:13 AM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
No that is wrong. As I understand it Sage outputs the wiz.bak every day when it does the EPG update. The wiz.bin gets outputted far more often than that but I wanted to be safe and used the wiz.bak.
Reply With Quote
  #15  
Old 12-20-2004, 07:24 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Wow. Only 3 downloads. I kind of thought there would be more interest in this. Oh well
Reply With Quote
  #16  
Old 12-24-2004, 01:23 PM
tealcomp tealcomp is offline
Sage User
 
Join Date: Dec 2004
Posts: 64
Quote:
Originally Posted by ToxMox
Wow. Only 3 downloads. I kind of thought there would be more interest in this. Oh well
Hello Toxmox:

I am going to give it a try

-Dan
__________________
AMD 3500+,Gigabyte GA-K8NSNXP-939, 2GB Main Memory
300GB Dedicated Video Array
Nvidia 6800GT Gigabyte(GV-N68T256DH) v67.03
1024x768 32bpp
Hauppage PVR-350
NDVD Decoder v1.00.67
RGB output to Panasonic 42" HDTV Plasma,
Windows XP SP2 1024x768 32bpp
Reply With Quote
  #17  
Old 12-24-2004, 02:00 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Cool! I forgot to mention this before but it needs to be extracted to your 'SageTV' program directory and then I'd schedule it using windows Scheduled Tasks and make it run like every 12 or 24 hours. Let me know how this works out for you.
Reply With Quote
  #18  
Old 12-24-2004, 02:42 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
There were a couple of problems with my first release. I uploaded a 1a revision to my previous post above.

http://forums.freytechnologies.com/f...6&postcount=11
Reply With Quote
  #19  
Old 12-25-2004, 03:35 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
maybe add a readme.txt with instruction on purpose and usage.
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #20  
Old 08-14-2007, 12:22 PM
waynedunham waynedunham is offline
Sage Icon
 
Join Date: Sep 2004
Posts: 1,368
Whew!!

Just had my first SageTV screwup in a LONG time. I was scheduling things to record over the next week and got all the way to the end when I noticed that a couple things that I had to use Search for to set up recordings weren't showing in the list of scheduled recordings.
I thought that was odd but figured maybe Sage needed a reboot since it (SageTV version 6.1.4.128 Java 1.6.0_02) had been running for a long time. I didn't check the running time, but I know it had been well over a month.

So I shut down Sage and waited for it to finish. I checked the running processes just to make sure that it wasn't still finishing up after the icon disappeared from the taskbar and then did a system restart.

Computer booted and Sage ran. Went into Sage Recordings and everything was there. However when I went into "View Recording Schedule" it was completely empty. Between the manual recordings, favorites, and IR there should have been about 60 items (I have mine set to a 7 day lookahead).

No biggie I thought, so I made a backup of both wiz.bin and wiz.bak and shut down Sage. Just for curiosities sake I tried starting sage up again, but it was the same thing. I tried replacing the wiz.bin with the wiz.bak file, but the same problem was there.

Luckily a LONG time ago I'd set up a script to run every day to backup the wiz.bin files onto another drive. I shut Sage down once more and deleted the bad wiz.bin file and replaced it with the backup from early this morning.

Sure I had to go back and set up my recordings again, but everything went fine this time.

I'm still not sure what happened, but at least I had backups!
__________________
Wayne Dunham
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:06 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.