SwanStream 64 Posted March 12, 2024 Posted March 12, 2024 So my Emby db is probably approaching 20 years old and gone through many many updates/downgrades etc as the beta path has dictated... I've got enough gremlins and 'non-sense' that I'd like to just wipe clean and 'start over' with the library without loosing one of the users watched status. Can anyone spell out the steps to do that? After doing a backup, I'm guessing it's: 1. shut down Emby 2. remove the library db (where is it, what's it called?) 3. start Emby 4. define new libraries as necessary 5. scan 6. restore user from backup Can anyone confirm/correct? Thx.
GrimReaper 4740 Posted March 12, 2024 Posted March 12, 2024 Sounds about right. Have you read related KB article? https://emby.media/support/articles/Backup.html 1
SwanStream 64 Posted March 12, 2024 Author Posted March 12, 2024 (edited) Thx. Where's the library db and what's it called... I'm on synology 7.x server... And by that question, yes I've read the doc mentioned... just don't know how to get to that location (I'm not great with synology...) For anyone else looking... it can be reached via ssh (putty in my case) login with admin sudo -i (reenter password) Now root access then cd to /volume1/@appdata/EmbyServer/data/ (in my case) library.db is located there. mv library.db library.db.old Edited March 12, 2024 by SwanStream
GrimReaper 4740 Posted March 12, 2024 Posted March 12, 2024 https://emby.media/support/articles/Backup.html#locate-embys-program-data-folder You'll need to SSH into your Syno. Example tutorial here: 1
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 Went through all that, then added a small library of tv shows. It went through the scan, completed... and tho the library shows in 'library setup' page, there is nothing showing on home screen.... absolutely nothing. File permissions look correct on the synology box.embyserver.txt
Happy2Play 9780 Posted March 13, 2024 Posted March 13, 2024 There should only be one thing that causes this User Access permissions. But there was another topic recently that had to create a new user on a new install. Does the library show for another user or a new user?
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 (edited) 10 minutes ago, Happy2Play said: Does the library show for another user or a new user? Another user, no. New user, yes. Edited March 13, 2024 by SwanStream
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 adjusted library access from"enable acess to all libraries" to none, then back seems to have fixed it.... 1
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 One last piece to this. I'd like to restore one of the users watched status(es). Is that stored in users.db?
Happy2Play 9780 Posted March 13, 2024 Posted March 13, 2024 @LukeMay be something that needs looked at but will try to test on a new portable to see if I can replicate as this is the second topic of an issue like this. As it looks like something sticking on User Access. Just now, SwanStream said: One last piece to this. I'd like to restore one of the users watched status(es). Is that stored in users.db? No it is in the library.db. Hope you have a backup (via plugin) as you can uses that backup to restore userdata. 1
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 yup, have backup. I'll explore and post back if it's not clear to me. thx @Happy2Play!
darkassassin07 652 Posted March 13, 2024 Posted March 13, 2024 The button at the bottom of that screenshot: 'extract data from backup' will allow you to restore the watch status of any backed up user to any current user.
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 (edited) And how can I select a prior backup (I believe it's keeping 5?) to extract/restore from? I don't think I want to restore... but the files are there... Extract seems to only pull the last backup. Which given how long it takes to do the initial scan of the library... was a day later than the user data I'm after. Edited March 13, 2024 by SwanStream
Happy2Play 9780 Posted March 13, 2024 Posted March 13, 2024 3 minutes ago, SwanStream said: And how can I select a prior backup (I believe it's keeping 5?) to extract/restore from? You don't get to choose it will come from the full back and all you can do is click the extract data from backup.
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 So if I understand you... I have to restore the prior fubar db, do a backup, turn off scheduled backup task, then redo all that I've done, followed by the extract? Seems complex, but if that's the only way.... please confirm I understand. Thx.
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 Is it possible to just rename the backup file? That'd be a lot simpler....
Happy2Play 9780 Posted March 13, 2024 Posted March 13, 2024 Just now, SwanStream said: So if I understand you... I have to restore the prior fubar db, do a backup, turn off scheduled backup task, then redo all that I've done, followed by the extract? Seems complex, but if that's the only way.... please confirm I understand. Thx. No, have you clicked Extract Data from Backup? It will give you another menu.
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 (edited) Yes, says successful, but the watched status has not updated. my assumption is that it's from the 'fresh' db, not the one I'm after. DB reset was 36ish hrs ago Edited March 13, 2024 by SwanStream
Happy2Play 9780 Posted March 13, 2024 Posted March 13, 2024 Just now, SwanStream said: Yes, says successful, but the watched status has not updated. my assumption is that it's from the 'fresh' db, not the one I'm after. Where is the original full backup before you removed the library.db? Did a backup already happen overriting previous library.db? You may have to copy one of the previous library.db from the db only backups into full backup folder.
SwanStream 64 Posted March 13, 2024 Author Posted March 13, 2024 So which folder is it pulling from? I can copy the correct db to the place it's looking easily enough, just need to know which folder to drop it in... I'd imagine it's one of the last two, tho the "full" seems outdated by modify date Thx.
Happy2Play 9780 Posted March 14, 2024 Posted March 14, 2024 (edited) But looking at your image above the midnight backup would have overwritten your full backup library.db so you will have to copy from one of the ones prior to you changing the library.db. Probably need to ensure you have a copy of this info outside of the plugin also. 5 minutes ago, SwanStream said: So which folder is it pulling from? Probably the 11th or 12th and you are only after the library.db. Basically, any backup before you removed the library.db whether you deleted or moved it. It will go in p\embyserver-backup-full\data replacing the existing one. Then you should be able to Extract that info from that db. Edited March 14, 2024 by Happy2Play
Happy2Play 9780 Posted March 14, 2024 Posted March 14, 2024 6 minutes ago, SwanStream said: I'd imagine it's one of the last two, tho the "full" seems outdated by modify date look at the date on the library.db in full backup.
SwanStream 64 Posted March 14, 2024 Author Posted March 14, 2024 The whole backup/restore utility,... Great idea in theory... in practice not so much. Replaced ALL library.db files with the one I want to extract from, done the extract and no watched status updates.
Happy2Play 9780 Posted March 14, 2024 Posted March 14, 2024 Can you post the server log but can not reproduce a issue here as I marked everything as unplayed and extracted userdata to restore previous view.
SwanStream 64 Posted March 14, 2024 Author Posted March 14, 2024 embyserver (1) (1).txt embyserver (1) (1).txt
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