revengineer 128 Posted January 26, 2019 Share Posted January 26, 2019 I am working on an emby server reinstall and followed the instructions at https://github.com/MediaBrowser/Wiki/wiki/Backup to migrate the userdatas table in the database. However, the instructions are incomplete so I need extra help. When I execute the command REPLACE INTO NewDB.userdatas SELECT * FROM userdatas I get the error table NewDB.userdatas has 10 columns but 11 values were supplied: REPLACE INTO NewDB.userdatas SELECT * FROM userdatas because the old database contains a field "lastPlayedDate" of type "datetime" which is not present in the new database created by emby server v4. When I delete this field in the old database, I get the error message below. Can I ignore this message? Or do I need to do this differently? Please advise. Thank you. Link to comment Share on other sites More sharing options...
Luke 37254 Posted January 26, 2019 Share Posted January 26, 2019 It might be better to migrate 3.5 to 3.5, then upgrade to 4.0 Link to comment Share on other sites More sharing options...
Carlo 4331 Posted January 26, 2019 Share Posted January 26, 2019 It might be better to migrate 3.5 to 3.5, then upgrade to 4.0 @@Luke, did you mean migrate from 3.5 to 3.6, then upgrade to 4? Link to comment Share on other sites More sharing options...
CBers 6795 Posted January 26, 2019 Share Posted January 26, 2019 @@revengineer Do you not have the BACKUP plugin installed? Much easier, although you need to also have Premier. 1 Link to comment Share on other sites More sharing options...
revengineer 128 Posted January 26, 2019 Author Share Posted January 26, 2019 It might be better to migrate 3.5 to 3.5, then upgrade to 4.0 The current database is already updated to v4, and my understanding is that I can no longer go back. So this field is left over from a past migration. The database was created a few years ago, so I am not sure whether the switch to the newer field that saves the last played date occurred with the v4 release or earlier. In any case, it seems that your suggestion does no longer work. Link to comment Share on other sites More sharing options...
revengineer 128 Posted January 26, 2019 Author Share Posted January 26, 2019 @@revengineer Do you not have the BACKUP plugin installed? Much easier, although you need to also have Premier. I do have the backup plugin and can use it for porting much of the configuration. It is my understanding from wiki article I linked above that the "played" status is not backed up by the plugin and must be transferred manually. I do not care so much about the status for movies, but I really need this for TV episodes. Link to comment Share on other sites More sharing options...
CBers 6795 Posted January 26, 2019 Share Posted January 26, 2019 I do have the backup plugin and can use it for porting much of the configuration. It is my understanding from wiki article I linked above that the "played" status is not backed up by the plugin and must be transferred manually. I do not care so much about the status for movies, but I really need this for TV episodes. It is backed up, as I've used the plugin to restore watched status many times over the years. Link to comment Share on other sites More sharing options...
revengineer 128 Posted January 26, 2019 Author Share Posted January 26, 2019 It is backed up, as I've used the plugin to restore watched status many times over the years. Hm, then I do not understand what the section on "Restore User Data" is for as well as @@Luke comment on the watch data in this post: https://emby.media/community/index.php?/topic/67866-where-are-movie-ids-stored/ Link to comment Share on other sites More sharing options...
Carlo 4331 Posted January 26, 2019 Share Posted January 26, 2019 No mention of using the backup/restore in that thread, just what would happen upon removing library.db. You could also get back watched status using the Trakt plugin if you had that running previously (and not mentioned in that thread either). Link to comment Share on other sites More sharing options...
CBers 6795 Posted January 26, 2019 Share Posted January 26, 2019 Hm, then I do not understand what the section on "Restore User Data" is for as well as @@Luke comment on the watch data in this post: https://emby.media/community/index.php?/topic/67866-where-are-movie-ids-stored/ I found it easier to install afresh, add your libraries, run the library scan then do the restore. I also pre-created the users before the restore. Link to comment Share on other sites More sharing options...
revengineer 128 Posted January 27, 2019 Author Share Posted January 27, 2019 (edited) It is backed up, as I've used the plugin to restore watched status many times over the years. I completed the emby server rebuild yesterday and you are correct in that favorites and watched status is retained on restore of the backup. The library.db is now a lot smaller (100 MB vs 1 GB). So all seems well. I still do not know what I am missing by not moving the "userdatas" field from the old library. If not significant I rather leave the library as is because I am not sure about any issues arising from the deviation of the wiki procedure mentioned in the OP. @@Luke seemed to not be sure either. Edited January 27, 2019 by revengineer 1 Link to comment Share on other sites More sharing options...
revengineer 128 Posted January 27, 2019 Author Share Posted January 27, 2019 No mention of using the backup/restore in that thread, just what would happen upon removing library.db. You could also get back watched status using the Trakt plugin if you had that running previously (and not mentioned in that thread either). The linked thread was about data in the library.db that is not included in the configuration backups. And no, I did not have Trakt running. What does Trakt store that config backup does not? The watched status seems to be backed up because it was properly restored. Link to comment Share on other sites More sharing options...
levan 0 Posted February 17, 2019 Share Posted February 17, 2019 (edited) It is backed up, as I've used the plugin to restore watched status many times over the years. Much easier, although you need to also have Premier. Edited February 17, 2019 by Happy2Play 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