# \[HowTo\] Plex database modification - Moving media the right/wrong way

**URL:** <https://forums.plex.tv/t/howto-plex-database-modification-moving-media-the-right-wrong-way/126701>\
**Category:** Tips, Tricks & How-Tos\
**Tags:** tipstricks\
**Created:** [December 9, 2015, 5:56pm UTC](https://forums.plex.tv/t/howto-plex-database-modification-moving-media-the-right-wrong-way/126701 "2015-12-09T17:56:26Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jelwell](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jelwell](https://forums.plex.tv/u/jelwell)\
**Post date:** [December 10, 2015, 12:19am UTC](https://forums.plex.tv/t/howto-plex-database-modification-moving-media-the-right-wrong-way/126701/9 "2015-12-10T00:19:08Z")

</div>

I opened up my database using [http://sqlitebrowser.org/](http://sqlitebrowser.org/)  
I manually updated section\_locations using the tool. Then I ran these 3 SQL statements:

`
UPDATE metadata_items
SET guid= replace(guid, 'file:///Users/jelwell/Shared', 'file:///Volumes/Movies')
where guid like '%file:///Users/jelwell/Shared%'
``
UPDATE media_streams
SET url= replace(url, 'file:///Users/jelwell/Shared', 'file:///Volumes/Movies')
where url like '%file:///Users/jelwell/Shared%'
``
UPDATE media_parts
SET file= replace(file, '/Users/jelwell/Shared', '/Volumes/Movies')
where file like '%/Users/jelwell/Shared%'
`

Note that media\_part uses a different reference notation than the rests. (no file:///).

I haven’t been able to drop the changes in place yet. I will try that later and report back.  
Thanks,  
Joseph Elwell.

---

_[View the full topic](https://forums.plex.tv/t/howto-plex-database-modification-moving-media-the-right-wrong-way/126701)._
