Search the Community
Showing results for tags 'backup.'.
kolonuk posted a topic in General/WindowsHi folks, Short question: How do I convert the old "LastPlayedDate" datetime field in the "userdata" table in library.db into the newer "LastPlayedDateint" integer field? Long question: I had emby installed on my FreeNAS for a while, and in December I wanted to update the FreeNAS version and at the same time consolidate my jails into my docker VM on ESX on another server. Unfortunately, emby in docker for me seemed to cause a lot of DB corruption in library.db about 24 hours after the library had finished being scanned and I started to watch stuff. Looking in the logs didn't yield anything spectacularly wrong or obvious. So I deleted it and started again, with no luck - the same corruption. In the end, I'd recreated/re-downloaded the container about 5 times, set local and remote storage for config (NFS, samba, etc), use another docker vm on a faster/different disk - seems no matter what I did, it still had issues. I even ran a memtest on the ESX server, which as you may know takes aaaaaages! (during which I had to rely on Netflix and ::shudder:: DVDs!) Long story short, I ended up creating a dedicated emby VM and copied across the config. At that time, v4 was released, so it did an upgrade on the databases, then I ran a library scan. After a few days, I decided it was stable enough that I removed the emby jail in FreeNAS and cleaned away all the config files (after making a final backup!). As per the instructions on how to manually backup and restore, I'm now at the point where I'd like to re-import my watched data. But... It looks like the upgrade or something else along the way changed the field type on the lastplayeddate from a datetime to an integer in the userdata table. So, what is the process of converting the datetime fields into an int? Is this SQLite or emby specific? I've exported the old table to an SQL file, so I can apply any formulas or do other processing easily. In case it matters, I'm a programmer by day, IT enthusiast by night, so I'm OK if the answer is not sugar coated! Actually, I could just set that field to null in my exported file... What does emby use that field for anyway? I haven't ever seen a "last played" tag anywhere, and to be honest might be quite nice to actually have it displayed! Thanks in advance!