vaise 340 Posted March 3, 2024 Posted March 3, 2024 I am rollling out a new prod server - was on beta. I dont want to use all my history. Whats the process ?
Happy2Play 9780 Posted March 3, 2024 Posted March 3, 2024 (edited) I would think just copying the database from one the other, but it has its own backup and restore function in plugin settings tab. Edited March 3, 2024 by Happy2Play typo 1
Happy2Play 9780 Posted March 3, 2024 Posted March 3, 2024 May want to run the task as it appears to be set to run weekly.
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 Ah yes - of course - it backs up every day and keeps 30 - I will copy that over and do a restore as a test. Cheers.
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 So - I did this as a test. I copied the export to the new system. Then did a load and selected it. But I got a 0 items restores. Still nothing showing in the tabs.....
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 Ignore that - there is historical data there - strangely not the the last month. Will do some more checking ./ compares
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 HHmmm - Is it possibly using the emby server name in the queries ? The new one is named 'Emby Live Server' Nothing is showing in any of the tabs. The default query and Example Query is pulling back data however.
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 It only seems to have imported a set of data for 2022.......
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 I stopped both servers - and copies the actual db file this time, and now all data is there. Maybe a bug with the backup / restore ?
Happy2Play 9780 Posted March 3, 2024 Posted March 3, 2024 Possibly as I have mine set to forever but appears to only go back a year. But if I remember correctly back then there was a issue with a change in the database. But you would just have to open your tsv file and look at what data it has backed up.
vaise 340 Posted March 3, 2024 Author Posted March 3, 2024 The tsv file contains data from 2022 until now - so its all there. The import process seems to only import a portion of 2022 for some reason.
Happy2Play 9780 Posted March 23, 2024 Posted March 23, 2024 On 3/2/2024 at 6:06 PM, vaise said: The tsv file contains data from 2022 until now - so its all there. The import process seems to only import a portion of 2022 for some reason. Finally got around to looking at this and is due to db schema changes over time so only current table is backed up.
vaise 340 Posted March 23, 2024 Author Posted March 23, 2024 5 minutes ago, Happy2Play said: Finally got around to looking at this and is due to db schema changes over time so only current table is backed up. This would the 'backups' are no good then would it not ?
Happy2Play 9780 Posted March 23, 2024 Posted March 23, 2024 Just now, vaise said: This would the 'backups' are no good then would it not ? Sort of as it is only for one table. But the db itself has the info for each table. I just merged them into one again. Obviously everyone will have different table names per date from schema changes. As each table has column changes. INSERT INTO PlaybackActivity(DateCreated, UserId, ItemId, ItemType, ItemName, PlaybackMethod, ClientName, DeviceName, PlayDuration) SELECT DateCreated, UserId, ItemId, ItemType, ItemName, PlaybackMethod, ClientName, DeviceName, PlayDuration FROM PlaybackActivity_20190524_183338; INSERT INTO PlaybackActivity(DateCreated, UserId, ItemId, ItemType, ItemName, PlaybackMethod, ClientName, DeviceName, PlayDuration, PauseDuration) SELECT DateCreated, UserId, ItemId, ItemType, ItemName, PlaybackMethod, ClientName, DeviceName, PlayDuration, PauseDuration FROM PlaybackActivity_20230427_121456;
vaise 340 Posted March 23, 2024 Author Posted March 23, 2024 Im dealing with incorrect play times now on the plugin thread - need to sort that out.
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