amb13 17 Posted January 27, 2020 Share Posted January 27, 2020 Hi I'm trying to migrate my emby-server to another PC. I've followed https://support.emby.media/support/solutions/articles/44001159936-backup for manual backup multiple times, but I get stuck at the end every time. When I try to restore the user data to library.db i get this error: Result: FOREIGN KEY constraint failed At line 1: REPLACE INTO NewDB.userdatas SELECT * FROM userdatas I'm thinking it has something to do with the table userdatakeys2. I does not seem like the Id's match between the old and new db, but I really have no clue. The old server was set up on 4.2 and is now running 4.3.1 as the new one is. Link to comment Share on other sites More sharing options...
RanmaCanada 338 Posted January 28, 2020 Share Posted January 28, 2020 All I've done in the past is just copy the entire emby folder, run the server and wait for an update (or just download a fresh copy and install overtop). I will be honest and say I haven't looked to see if migration has been addressed lately, as it was one of my biggest gripes. Having to resend user invites is a pain, but the last time I asked Luke about this, it apparently had something to do with security, IF I am remembering correctly (I could be completely wrong and stupid, which is not unheard of). Link to comment Share on other sites More sharing options...
Happy2Play 8252 Posted January 28, 2020 Share Posted January 28, 2020 (edited) Since there are/can be database changes across versions. the table import option only works on same version databases. So it really is not a good migration option. There are alway changes that only apply to new installations and these database changes are one of them. Just like in 4.4.x.x changing remove sortcharacters requires a clean install to fix photo sorting/naming issues. But in theory you should be able to migrate the entire \emby-server\programdata folder. Assuming same OS migration. Edited January 28, 2020 by Happy2Play Link to comment Share on other sites More sharing options...
amb13 17 Posted January 28, 2020 Author Share Posted January 28, 2020 Forgot to mention. The paths in the new library will be different. Would it still work to just copy the whole folder? @@cayars Link to comment Share on other sites More sharing options...
Carlo 4330 Posted January 28, 2020 Share Posted January 28, 2020 You should be able to go in and change the paths for each library, then do a full library scan and Emby will find and fix all of your media. Link to comment Share on other sites More sharing options...
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