SpaceInvaderOne 1 Posted September 26, 2023 Posted September 26, 2023 Hello all, This is my first post here, but I've been an Emby enthusiast for many years, running it within Docker on my Unraid servers. Over time, my setup has looked like this -- Main Server This has all of my media and the primary Emby container. The Emby container has an IP of 10.10.20.210. This server operates about 14 hours daily, after which it sleeps. Backup Server An older gen 8 micro-server, has a one-to-one backup of all media, also running Emby in a Docker container with the (same container IP of 10.10.20.210). This identical IP approach allows clients to connect seamlessly regardless of which server is active. Only one Emby server is ever running at once. Scripts manage this switching, ensuring media and appdata (for database) synchronization for a smooth user experience. My reason for this dual-server approach has been to save on power costs here in the UK. But now, I am trying to change my setup due to just getting a new mini server, which has replaced my older pfSense router build that obviously was on 24/7. This mini server, Has an intel n100 cpu with iGPU (UHD Graphics) and is now running pfSense and home assistant in a VM. I wanted this mini server to also replace both servers' roles for Emby, making my system more efficient. I have moved Emby to this server in Docker (with the same IP 10.10.20.210), and all other Emby servers are now not used. it has limited 4tb NVMe storage but is optimized to ensure it doesn’t get filled. This server takes in all new Emby media initially. Then retains content for 8 weeks before moving it to the main server. I have changed my Emby media library, it is now structured as 4 separate libraries, Newly added TV Series (local storage on the mini server). Newly added Movies (local storage on the mini server). All TV Series (mix of local storage and SMB on the main server). All Movies (same as above). My objective? 24/7 access to fresh content, and older media access only when the main server is active. The challenge? When the main server is off and someone tries to access its content. My questions are: Wake-on-Error -- If Emby fails to find an item, can that error trigger a webhook (from which I can implement wake-on-LAN)? In essence, can a missing file initiate an action to wake the main server in any way? Remote Location Handling -- How does Emby treat an unavailable remote location? Does it delete the media or label it as unattainable? If the latter, how does Emby recognize when the location is back online? I'm thinking of turning off auto media library scans and letting the main server trigger these through the API. Syncing Watch History -- My ideal scenario would have two distinct Emby servers: one on the mini server (for the latest content) and another on the main server (for the complete library). Is there a mechanism to synchronize watch history between them even though media not identical? Given the mini server's efficiency and 24/7 operation anyway, I hope to always access the newest content. But, I need a smooth way to pull in older content when required. Any insights or overlooked methods to realize this?
Luke 42078 Posted September 26, 2023 Posted September 26, 2023 Quote Wake-on-Error -- If Emby fails to find an item, can that error trigger a webhook (from which I can implement wake-on-LAN)? In essence, can a missing file initiate an action to wake the main server in any way? Hi, there is currently no way to do this.
Luke 42078 Posted September 26, 2023 Posted September 26, 2023 Quote Remote Location Handling -- How does Emby treat an unavailable remote location? Does it delete the media or label it as unattainable? If the latter, how does Emby recognize when the location is back online? I'm thinking of turning off auto media library scans and letting the main server trigger these through the API. Hi, we try to avoid removing it from the library. It just depends on how it appears to the server. If the server gets an error when trying to read the directory listing, then it will treat it as such and won't remove anything from the database.
Luke 42078 Posted September 26, 2023 Posted September 26, 2023 Quote Syncing Watch History -- My ideal scenario would have two distinct Emby servers: one on the mini server (for the latest content) and another on the main server (for the complete library). Is there a mechanism to synchronize watch history between them even though media not identical? The Trakt plugin could help with this.
SpaceInvaderOne 1 Posted September 27, 2023 Author Posted September 27, 2023 Thanks for your quick reply Luke. I will check out than plugin.
Neminem 1518 Posted September 27, 2023 Posted September 27, 2023 @SpaceInvaderOne Just out of curiosity, Are you moving your DB between servers ?
SpaceInvaderOne 1 Posted September 27, 2023 Author Posted September 27, 2023 30 minutes ago, jaycedk said: @SpaceInvaderOne Just out of curiosity, Are you moving your DB between servers ? Hi, yes, I was transferring the database between the servers, depending on which one was active.Here's how it worked, before the main server went into sleep mode, it would stop Emby and then wake up the backup server. Using rsync, the script would then move the appdata, (which includes the database) to the backup server and then start Emby there. When it was time for the main server to come back online, the procedure was executed in reverse, the appdata and database were synced back to the main server. This ensured the database, and consequently the watch history, was consistently current on the active machine. It worked well and i didnt have an issue with it. However, I'm now venturing into a different approach. Probably in hindsight, perhaps I should just keep it as it was !! 1
Neminem 1518 Posted September 27, 2023 Posted September 27, 2023 Thanks for your in site. And yes, you old way of doing it, should work i theory
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now