Change media location in Plex Database

It seems that Plex gives us no real option to mass change a root directory for indexed media without re scanning the entire media directory.

By using SQLite browser from SQLite Browser we can make the necessary changes .

An example is to have media location changed from /mnt/SMB to /mnt/media. Using SQLite browser we can open the Plex database and run the following SQL statement:

UPDATE media_parts SET file = replace(file, '/mnt/SMB', '/mnt/media') where file like '%/mnt/SMB%'

The above command will change the locations in the Plex database from /mnt/SMB to /mnt/media without the need to reindex your whole Plex library.

I hope this helps someone.