Smaky 131 Posted February 17, 2018 Posted February 17, 2018 I have read the wiki on backing up and migrating from one server to another. However, in the scenario I am pursing I want to migrate from the default Server install (via installer) to a portable one. The issue is that my SSD is running out of space and I would rather have all Server setup in a custom path where everything lives. I have already tried installing the portable server and transferring configuration (via backup plugin). That works, however I end up with a server with no media registered on it and having to rebuild the whole library and metadata would take a long time (thousands of movies, anime, and tv shows). So I was wondering if there might be some steps to transfer most of the data from the default server install into a custom path portable config without having to rebuild the whole thing.
Happy2Play 9780 Posted February 17, 2018 Posted February 17, 2018 Well it is all experimental but you could copy or move contents from \emby-server minus system folder to the location of your portable. In the new portable it should be your programdata folder, then run a library scan.
Smaky 131 Posted February 17, 2018 Author Posted February 17, 2018 Yes that's exactly what I am just doing... I had to recreate the media libraries manually and run a scan. It will take some time. Keeping my fingers crossed.
Smaky 131 Posted February 17, 2018 Author Posted February 17, 2018 Well... it has been overnight and the library is progressing very slowly... is there some way to migrate the library contents (I mean the database itself) even if that means doing som SQL magic? I guess I can try it out with a bit of help.
Luke 42078 Posted February 17, 2018 Posted February 17, 2018 You should be able to just copy the parent of the system folder to wherever you want.
Smaky 131 Posted February 18, 2018 Author Posted February 18, 2018 I tried by copying the backed up metadata folder into the new portable's metadata path. However, when Emby Server portable was started the cache, logs, and metadata folder that got created upon initial setup of the new server are now pointing the the userdata folder (as in the old installed server)... and I found no way to set these up to point tot he custom location the server resides in. On the positive, the library was retained with all info.. but it seems it is only because it is still accessing the "old" installed path. You should be able to just copy the parent of the system folder to wherever you want.
Chyron 256 Posted November 12, 2018 Posted November 12, 2018 (edited) EDIT: Wrong thread. Edited November 12, 2018 by chyron8472
them8os235 47 Posted January 1, 2025 Posted January 1, 2025 (edited) On 2/16/2018 at 10:42 PM, Smaky said: I have read the wiki on backing up and migrating from one server to another. However, in the scenario I am pursing I want to migrate from the default Server install (via installer) to a portable one. The issue is that my SSD is running out of space and I would rather have all Server setup in a custom path where everything lives. I have already tried installing the portable server and transferring configuration (via backup plugin). That works, however I end up with a server with no media registered on it and having to rebuild the whole library and metadata would take a long time (thousands of movies, anime, and tv shows). So I was wondering if there might be some steps to transfer most of the data from the default server install into a custom path portable config without having to rebuild the whole thing. ... I tried by copying the backed up metadata folder into the new portable's metadata path. However, when Emby Server portable was started the cache, logs, and metadata folder that got created upon initial setup of the new server are now pointing the the userdata folder (as in the old installed server)... and I found no way to set these up to point tot he custom location the server resides in. On the positive, the library was retained with all info.. but it seems it is only because it is still accessing the "old" installed path. [There are numerous similar and newer threads and have read them. But rather than start yet another I chose to build on this quite old thread as it most closely aligns to me and my need.] It's really disappointing that there wasn't a follow-up by Emby staff or closely aligned providing a resolution to this. I find myself in this exact situation; so much so that I had to check the name on the OP of the thread as I thought that I could have written this. Big LOL. So as not to bury the lead: *** Anyone able to interject some more detail and guidance to what Smaky detailed about migrating or starting over on a D:\ or other drive and fully restoring the current library rather than rebuilding from scratch? Editing of config / XML files with the server off before initial startup and/or other actions are fine. *** Much thanks if so. TL;DR My Emby-Server is big ... really big: I was constantly fighting making space, uninstalling things I need, etc. Only to find the 30, 40, 60, whatever Gigs I got freed would be down to significantly less only a few hours later. I saw C:\ was down to 6Gigs and imagining a bluescreen was immanent when I got serious about figuring out where all the data was going. Enter WizTree! (Was so fast and helped so much I immediately purchased it) And was pretty shocked to discover two things: 1. Wow, Emby-Server completely dominates my C:\ drive ! 2. Space allocated to hiberfil.sys was the bigger, major culprit of where my space was disappearing to! (no longer shown above) [Quick aside: Since I upgraded my server to 128Gigs of DDR4, ran w/o a swap file, and server runs 24/7, there was absolutely no reason that the machine was configured to allow for Hibernation. And since the hibernation file is directly related to memory "in use", when I upgraded to 128Gigs I inadvertently sent the hiberfil.sys out of control. So now that I disabled Hibernation the critical emergency has passed and I see a varying 120 - 150Gigs of free space. If you are in the same boat issue this as an admin to disable hibernation: powercfg -h off ] But I need to reinstall many things I uninstalled as I fought the C:\ freespace battle, many of which can only be installed to C:\ [damn you NVIDIA, as one example]. So, I still need to get Emby-Server and all data, ESPECIALLY all data, OFF the C:\ drive; plus my system SSD isn't the most durable so I need to cut-down on the level of continued writes/rewrites/deletes to it. Edited January 1, 2025 by them8os235
Lessaj 467 Posted January 1, 2025 Posted January 1, 2025 You should configure a different location for your transcoding-temp folder, that's your biggest problem, and you probably need to clean up some old folders from it too - don't worry it's all temporary, you can delete anything under it that's older than a day safely. You can move the metadata folder and tell it the new location and run the task to scan the metadata folder just in case. You can also move the cache folder and tell it where it is, I don't think anything in this folder is critical since it's just a cache. Your library itself doesn't seem that big since your data directory is only 500 mb, not much bigger than mine. 1
them8os235 47 Posted January 1, 2025 Posted January 1, 2025 (edited) Awesome Thanks, @Lessaj I was wondering about how transient or likely to be reused some of those folders were that you named. Edited January 1, 2025 by them8os235
them8os235 47 Posted January 1, 2025 Posted January 1, 2025 (edited) 1 hour ago, Lessaj said: You can move the metadata folder and tell it the new location and run the task to scan the metadata folder just in case. You can also move the cache folder and tell it where it is, I don't think anything in this folder is critical since it's just a cache. Your library itself doesn't seem that big since your data directory is only 500 mb, not much bigger than mine. p.s. I had forgotten about all those paths that can be defined under various places and thus data moved under Server > "Library > Advanced" / Transcoding / Settings. I found btw a few reasons the cache path to be useful to keep around. So will be doing a move instead of a purge and re-creation. But don't think I have need to persist the current transcoding cache content. Eh, I may anyway. Time to do some more specific benchmarking between two M.2 NVMe drives to determine which is more suitable for the workloads. I was convinced I wanted to move the whole Emby-Server dir but thinking now what you suggest should be sufficient. Emby-Server dir of under 600 megs or even if a Gig or two is quite acceptable. Edited January 1, 2025 by them8os235 1
js28194 36 Posted January 2, 2025 Posted January 2, 2025 (edited) I have used this in the past. https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html Stop Emby Server, copy the folders from your current directory and put them were you want, delete the emby folder. Now go to were you put the folder, right click and pick link source, then go back to the original location where it WAS installed and right click and select drop as symbolic link. Everything will just work normally and nothing to rescan, or anything else specific to do. This way your install can be on a centralized nas storage location, but to your server it appears as a local install. PS Double check my instructions, as I haven't had to do this in years, but I still have the context menu installed on my server. PS PS, I would use some test folders, to make sure it does exactly what needs to be done before deleting any data. Like I said, it's been years for me. Edited January 2, 2025 by js28194 1
them8os235 47 Posted January 2, 2025 Posted January 2, 2025 45 minutes ago, js28194 said: I have used this in the past. https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html ... Oh that's kewl, thanx. I was wondering earlier today if Windows' version of 'links' would work. Perfect to know it does. I found also the configurable definitions won't take effect immediately -- as the emby server's default locations continue to get new files created within them after I defined the new location -- so requires an emby-server restart. As I have 14 recordings going atm and don't see a break in my scheduled recordings for as long as I looked, whether the server stop/start is for that or this suggestion, it'll have to be a while. I do maintain a mini-PC that is usually just for monitoring but has both Emby and Channels installed on it, where I spin-up the services to take over recordings when there are only a few to do, so I'll definitely have to take that route. Thanx again!
js28194 36 Posted January 3, 2025 Posted January 3, 2025 You have to stop the Emby Server as the library.db will not copy when it's in use. Also, I would like to caution you, that if for whatever reason you loose network on your LAN i.e from your Server to where you actual Emby Folder is now residing, there are some weird issues that crop up such as library out of sync, playback points not syncing. This is what I have done: Create a VHDX using disk2vhd and migrated that to a secondary Windows Server 2019 with Hyper-V and made sure it booted. Changed the IP Address to make sure it doesn't conflict. In this VHD, I stopped the Emby Server and copied the the entire install folder to a centralized location. Then renamed my existing install folder to emby-server_backup. Created the symbolic link from the central location back into the VHD C:\users\user\appdata\roaming folder and launched Emby. It totally worked with now a replicated backup Emby Server. This is due to the fact that my libraries in Emby Server are defined using IP Address of NAS server, so nothing to reconfigure. Now, to note is that does not keep both installs synchronized as they are both independent, but it can indeed be done if both production server and backup VHD server where pointing to the same centralized install server. The backup VHD server never actually get's used directly anyway. 1
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