SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

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 11-03-2014, 10:50 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
How can you keep two Sage servers synched up for Recorded TV?

I have two Sage servers running at home - my main system which is running on Win7 with a bunch of tuners and a backup system running on WHS 2011. The backup system doesn't have any tuners, nor does it have a RecordedTV folder. But all other video, music and photo files are sync'ed nightly using SyncToy. I use the backup server primarily as a WHS server to back up all of the PCs on my LAN.

If my main server fails then I can just switch my extenders to the backup server and be up and running in a minute or two except that I can't record any new shows and there wouldn't be any access to recorded TV shows. Stuff that I want to keep permanently is archived to a different folder in my video library so it would be available. So right now all of the hard drives being access by the backup server are local to the backup server.

But how should I set things up to allow my backup server to access the recordings, including real-time recordings on my primary server? One slight difference here is that the recording drive would be on my main server but that shouldn't be a big deal. Can I somehow tell the primary server about the metadata for shows as soon as they start recording? I imagine you might be able to do this with a SJQ script that kicks off when a recording starts. Really what I want to do is to have the backup server treat recordings on the main server as if they were its own recordings, except for the location of the hard drive.

Or do I use the network encoder functionality for Sage?

I guess I could add the primary server's RecordedTV drive to the backup server's video library but that wouldn't give metadata for shows that can't be scraped and the files would only appear on the backup server when you do a media rescan.

The benefit that this would give me is that backup would have more complete functionality, and if I had exactly the same functionality with the backup vs the primary then I could point some of my extenders at the backup which allows more extenders to run simultaneously and helps to solve problems caused by running out of JVM.

I guess what I am looking for here is almost the same as what the Plex Scanner for Sage does except that the Sage API on my primary server would be sending info to the Sage API on my backup server.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #2  
Old 11-03-2014, 11:10 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Off the top of my head, it's possible, just depends how much effort you want to put into it.

Basically, I'd create a dummy network tuner (Narflex has code/instructions in the threads somewhere) on the backup system and assign an EPG lineup to it that contains all of the channels available on the primary.

Then when recordings finish on the primary, you send the EPG info of what was just recorded (external show ID, file) to something on the backup that can then import that new file and associate with the the same show id in your backup EPG. Since the show ids are guaranteed to be equal across EPG instances, you're going to get the metadata associated properly.

Only thing this doesn't allow is live tv viewing while files are recording. You could simulate that if you really wanted by writing a much smarter network tuner, but just thinking of that logic makes my head hurt at this hour. Basically it would be along the lines of a recording starting on your primary would have to send the details to the secondary which would then trigger a manual recording on your network tuner. The network tuner in this case would just duplicate the file from the primary until the recording was over then I'd manipulate the secondary's wiz.bin to just point to the primary's file and delete the copy generated by the secondary to save space. I'm sure I'm oversimplifying many of the details required to even make it work, but that's my just before bed, top of my head thoughts on this. For starters, this would require multiple network tuners (one for every tuner on the primary) and you'd need to twice the space in order to create the "live recordings" for the secondary and to trick it into allowing live tv viewing from the secondary. Yeah, my head is spinning thinking about this, good night! But if you want it bad enough, I say it's definitely possible -- at least in theory.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #3  
Old 11-03-2014, 11:12 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Actually, can't you just make the backup a network slave/tuner to the primary? Never tried any of those features. Or can extenders still only connect to the primary in that type of setup?
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #4  
Old 11-03-2014, 11:22 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I am not sure what you mean by network slave?

How about this -use a recording starts trigger in SJQ on the primary server to create a Show and Airing with info on the backup server from the primary server, including file which is UNC mapped so they same path is valid on either tuner. Isn't that possible? Or how about a .properties file?

That way you aren't doing any trickery with fake recordings, etc and the file should be available immediately once it is created. so you don't have to wait for it to finish. Or does that have the possibility of corrupting the file?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #5  
Old 11-04-2014, 09:20 AM
will will is offline
Sage Fanatic
 
Join Date: Jul 2009
Location: New York
Posts: 798
So it seems that the files will be stored on some type of NAS server so if SageTV server A goes down, then SageTV server B can still access all the content.

Assuming this is correct, what if you moved the SageTV install files to the NAS and mapped it as a network drive within Windows. So SageTV A's service would run off of the NAS. You can setup the SageTV B server the same way.

So if A fails, just launch the service on B and it will have the exact same settings as A (including the same wiz.bin file).

I don't do this exactly now, but I do run SageTV off of a different drive that is in a RAID 6 array and I have no problems. I don't see why using a mapped drive to a NAS would be any different.
__________________
Will

OS: Windows 7
Hardware: Intel Core i7-920 with 12GB RAM & an Adaptec 5805 with a Chenbro 36-port SAS Expander
Case: Antec 1200 with 4 iStarUSA trayless hot-swap cages (20 drives max)
Drives: 8 Toshiba/Hitachi 2TB drives in a RAID 6 & 7 Toshiba 3TB drives in a RAID 6
Capture Cards: HDHomeRun Connect Quatro 4, Hauppauge 60 HD-PVR
Players: 5 HD300s, 2 HD200s
Reply With Quote
  #6  
Old 11-04-2014, 09:32 AM
will will is offline
Sage Fanatic
 
Join Date: Jul 2009
Location: New York
Posts: 798
Also, you might want to consider hardening your system instead of making a duplicate backup.

Probably the most vulnerable parts of your server are hard drives, power supply, and RAM (in that order).

My server's CPU and motherboard are 9 years old. Yet, I have harden my server over the years so it is very reliable. All of my hard drives are in a RAID array ran by a dedicated RAID card, I've upgraded my cheap power supplies (after going through two) and now use a Seasonic SS-1050XM ATX 1050 Power Supply ($200 PS), and I have replaced the RAM probably about 6 times. In my defense though, this system uses DDR2 RAM which is known to fail after about 18 months so I've started replacing the RAM about once every 14 months just to prevent headaches.

It may be easier to focus on managing just one Sage server and instead get a case/motherboard that supports dual power supplies, use ECC ram that is tested and guaranteed for so many hours (if your motherboard supports it), and get your hard drives into a redundant mode that can withstand at least two consecutive failures with no downtime. I recently lost two 3tb drives at the same time and had no downtime during the rebuild.
__________________
Will

OS: Windows 7
Hardware: Intel Core i7-920 with 12GB RAM & an Adaptec 5805 with a Chenbro 36-port SAS Expander
Case: Antec 1200 with 4 iStarUSA trayless hot-swap cages (20 drives max)
Drives: 8 Toshiba/Hitachi 2TB drives in a RAID 6 & 7 Toshiba 3TB drives in a RAID 6
Capture Cards: HDHomeRun Connect Quatro 4, Hauppauge 60 HD-PVR
Players: 5 HD300s, 2 HD200s
Reply With Quote
  #7  
Old 11-04-2014, 10:14 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Actually the files are all stored on local hard drives fro Server A. All content is synched to Server B with the exception of the RecordedTV drive. Content that I want to keep is moved from the RecordedTV drive to a Video library drive which is then synch'ed.

This is my "Business Continuity" strategy that allows me to recover from a problem on Server A. I can get back up and running ASAP with exception of: content on the RecordedTV driver, live TV and new TV recordings. But we never watch Live TV, or at least we don't on Sage as most TVs also have cable STBs - these were purchased years ago so there are no ongoing rental fees.

The reason I want to make this new change is for load distribution - you can only attach about 4 extenders to a Sage server before it starts choking due to a lack of JVM. The downside is that if Server A is down the I won't have TV functionality on Server B. But that is what I have today.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #8  
Old 11-04-2014, 10:20 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by will View Post
Also, you might want to consider hardening your system instead of making a duplicate backup.
I actually like having the redundancy of two separate boxes. I also like some of the features of WHS. I used to run my Sage server on WHS v1 but I had some issues. I think these are resolved in WHS 2011 but I still like running Sage on a normal Windows install. I am increasing using other software to get at my media - like Plex, AirVideo, etc.

With my current config my Sage system drive is on an SSD and it is backed up to the WHS box nightly. Resuming from a system drive failure takes about an hour and I keep a spare SSD on hand. Obviously recovering from other failures, like RAM, will take longer but then I can just use the backup server with its somewhat limited functionality.

I don't know that it is worth the cost and hassle to hardening the single system and even that wouldn't help with the load distribution.

Why do you need a >1kW power supply? How much power does your system draw (isn't it video card that really draw lots of power)? Can't you get a similar quality PS that is smaller as isn't it inefficient to run a PS at a very low load factor?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #9  
Old 11-04-2014, 10:57 AM
will will is offline
Sage Fanatic
 
Join Date: Jul 2009
Location: New York
Posts: 798
Quote:
Originally Posted by wayner View Post
I don't know that it is worth the cost and hassle to hardening the single system and even that wouldn't help with the load distribution.
That is a good point. I have never run more than 5 extenders at a time; usually only four are ever powered on at once so I don't have the same issues you might have. So if you power on all 8 extenders I bet it can cause some issues.

Quote:
Originally Posted by wayner View Post
Why do you need a >1kW power supply? How much power does your system draw (isn't it video card that really draw lots of power)? Can't you get a similar quality PS that is smaller as isn't it inefficient to run a PS at a very low load factor?
I got the 1k PS for two reasons.
  1. I run 15 7200 RPM drives that are always fully powered on, two 7200 RPM drives as hot spears that occasionally spin up for testing, and one 10,000 RPM drive (eventually I'll add in two more 7k drives)
  2. It is really hard to find an extremely high-quality PS that isn't over 1k and has enough SATA power connector. I looked hard and even server PSs didn't have enough (I needed a PS that supported 20 SATA power connectors) for all my bays
__________________
Will

OS: Windows 7
Hardware: Intel Core i7-920 with 12GB RAM & an Adaptec 5805 with a Chenbro 36-port SAS Expander
Case: Antec 1200 with 4 iStarUSA trayless hot-swap cages (20 drives max)
Drives: 8 Toshiba/Hitachi 2TB drives in a RAID 6 & 7 Toshiba 3TB drives in a RAID 6
Capture Cards: HDHomeRun Connect Quatro 4, Hauppauge 60 HD-PVR
Players: 5 HD300s, 2 HD200s
Reply With Quote
  #10  
Old 11-04-2014, 11:13 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
I am not sure what you mean by network slave?
Can't you make a second Sage server a network encoder for a primary server? And in that setup, can an extender connect to either the primary or the network encoder? If so, problem solved. But I have zero experience with this kind of setup so I may be way off base.

Quote:
How about this -use a recording starts trigger in SJQ on the primary server to create a Show and Airing with info on the backup server from the primary server, including file which is UNC mapped so they same path is valid on either tuner. Isn't that possible? Or how about a .properties file?
Assuming the above isn't possible, then yes this is what I was thinking. However, you can't do it at the start of a recording, only after the recording has ended. Why? When you import the active recording and attach it to the show id on the secondary, the file will only be seen as a partial recording on the secondary. Will that correct itself as the file continues to record? Not sure, gut says no. But if I'm wrong then this is clearly the optimal method to achieve your goal. You'll have to test. The only sure way I know to get that live tv situation to work on the secondary would be to fake it via network tuners with a bunch of crazy logic to fake the secondary out into thinking it's actually recording something.

Quote:
That way you aren't doing any trickery with fake recordings, etc and the file should be available immediately once it is created. so you don't have to wait for it to finish. Or does that have the possibility of corrupting the file?
Don't think you'll corrupt the primary's recording, I just think the secondary will import it as a partial recording and not recognize the file as it continues to grow. To my knowledge, the only part of Sage's core that recognizes and deals with actively growing files/recordings is the recording engine, meaning you'd need network tuners to convince the secondary that there are active recordings in progress and handle them appropriately.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #11  
Old 11-04-2014, 02:05 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I did something a while back by sharing the Sage DB and accessing it by 2 servers by changing the location in both Servers to point to the shared wiz.bin.

wizard/db_file=\\shared\\Wiz.bin.


But one thing I found out is that what ever Server starts up first will have full access to the DB but the other will only have read access.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #12  
Old 11-04-2014, 02:13 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Interesting. What happens when something is recording on the primary? Does the secondary also think something is actively recording and handle it as such? My gut still says no on that, but I've been wrong before.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #13  
Old 11-04-2014, 02:49 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by Slugger View Post
Interesting. What happens when something is recording on the primary? Does the secondary also think something is actively recording and handle it as such? My gut still says no on that, but I've been wrong before.
Well I think the Idea in my case was to continue using the main Server and use the backup server as a client with the -client switch. In the event the main one failed. I could restart the secondary server and carry on. And have all clients and extenders point to the new server.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
Reply


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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you have two Sage servers use the same wiz.bin file? wayner SageTV Software 13 01-05-2012 05:09 PM
Using two Sage Servers gandalf SageTV Software 10 02-28-2010 01:56 PM
Good Solution for two Sage Servers? silkshadow SageTV Software 9 04-20-2005 12:04 AM
Sage Servers Down? m0ng00se30 SageTV EPG Service 13 12-21-2004 06:30 AM
audio not synched buc SageTV Recorder Software 6 03-16-2003 07:03 PM


All times are GMT -6. The time now is 11:04 PM.


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