mikiher / audiobookshelf-windows

Installs and manages Audiobookshelf on Windows
44 stars 1 forks source link

Migrating server data from an existing Docker installation #3

Open lemendoza956 opened 6 months ago

lemendoza956 commented 6 months ago

I have the docker version and created a backup. When I restored it on your windows version it doesn't restore the book cover images. I don't have many audiobooks but I would still have to go one by one and match the books to restore the book covers.

mikiher commented 6 months ago

I am pretty sure what you did is not supported at the moment.

I believe the docker version database contains paths to covers in the docker directory space (even if they map to windows folders). When you restore a backed up version of that into your Windows install (which knows nothing about docker), those paths do not exist, so images cannot be restored.

What you're requesting seems to be a valuable feature. I'm not sure how easy it is to implement (also possible that I'm all wrong about this, and it's a very easy fix).

@advplyr what do you think?

advplyr commented 6 months ago

The paths to your library folders would need to be exactly the same or it will not work, so in other words you cannot do what you are trying to do without manually updating all of the file paths in the database.

I don't think this is something we will be supporting since how would we know what file paths to use?

You can do this yourself though and maybe if you can write some good SQL queries it wouldn't be too difficult.

It's not just the images that won't work, you won't be able to play the audio files either since those file paths will also be incorrect.

mikiher commented 6 months ago

The paths to your library folders would need to be exactly the same or it will not work, so in other words you cannot do what you are trying to do without manually updating all of the file paths in the database.

I don't think this is something we will be supporting since how would we know what file paths to use?

in abswatcher, I obtained the mapping between docker and windows folders programmatically by inspecting the audiobookshelf docker container. A similar approach can be used here.

You can do this yourself though and maybe if you can write some good SQL queries it wouldn't be too difficult.

I might get to write this docker-to-windows audiobookshelf migration tool at some point - as I said, it would be a valuable feature to have, since up until now docker was the recommended option for installing on Windows, and I'm sure many people have large docker based config and metadata directories.

I don't believe I will get to this soon, though.

It's not just the images that won't work, you won't be able to play the audio files either since those file paths will also be incorrect.

advplyr commented 6 months ago

It will be nice to offer as an external script but I don't think it should be part of the server. Possibly part of the Windows tray app if it is possible to add in a clean way.

mikiher commented 6 months ago

Agreed, that's what I meant.

anakinsleftleg commented 4 months ago

This would be great, since the tools to create MB4 files and do metadata embedding and chapter editing (actually I haven't checked if these are in the Windows version), are only in the docker version and are great tools. So managing all the audio files there, and then eventually importing the database into the Windows version would be ideal.

GamerMagic12 commented 4 weeks ago

Using the built-in "Find and Replace All" tool in SQLite Browser, I migrated all old Docker file paths to the new Windows paths by simply updating the beginning of each path. This allowed me to transfer all user progress and all the other data. It took at most like 5mins and was super easy.