Modifying backup before starting a new ABS container on a new NAS
Hi,
I have the following issue: I am migrating from my old Synology NAS to a new NAS running TrueNAS. I ran ABS in Docker on the old and plan to run it the same way, with one major difference: old ABS had two libraries (both with audiobooks; for ebooks I use other software) and in my new NAS I united these two libraries. I can easily start a new ABS container, but I want to keep my reading stats, gathering of books into series, etc. So, I am thinking about taking backup from my old ABS and changing the SQLite database inside (backup file has the extension .audiobookshelf but it is just .zip file). I asked AI how to change to receive my goals and it suggested the following:
-- Update paths in the library settings themselves
UPDATE libraries SET folderPaths = replace(folderPaths, '/books1', '/audiobooks');
UPDATE libraries SET folderPaths = replace(folderPaths, '/books2', '/audiobooks');
-- Update paths for each specific book in the database
UPDATE libraryItems SET path = replace(path, '/books1', '/audiobooks');
UPDATE libraryItems SET path = replace(path, '/books2', '/audiobooks');
-- Update paths for individual audio files inside the books
UPDATE libraryFiles SET path = replace(path, '/books1', '/audiobooks');
UPDATE libraryFiles SET path = replace(path, '/books2', '/audiobooks');
This assumes that old libraries had paths '/books1' and '/books2' and the new will be '/audiobooks'. The suggested change seems logical, but AI often gives total bullshit that seems logical. Therefore, if anyone had a similar experience, please share!
Thanks!