# Move DVR media

**URL:** <https://forums.plex.tv/t/move-dvr-media/791539>\
**Category:** Metadata & Adding Files\
**Tags:** server-windows\
**Created:** [May 4, 2022, 11:18pm UTC](https://forums.plex.tv/t/move-dvr-media/791539 "2022-05-04T23:18:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 4, 2022, 11:18pm UTC](https://forums.plex.tv/t/move-dvr-media/791539/1 "2022-05-04T23:18:20Z")

</div>

Server Version#: 1.26.0.5715  
Player Version#: n/a

I had to move my media from one drive to another. I have empty trash automatically disabled. When doing the move, I slightly changed the directory structure. I updated the path of the libraries; however Plex is showing all my DVR content as unavailable.

For example, on one library…  
Old path: “L:\Libraries\Media\Videos\DVR\TV Sports”  
New path: “L:\Media\Videos\DVR\TV Sports”

This was updated in the library path settings. Scan library, nothing picked up.

 ![image](https://global.discourse-cdn.com/plex/original/4X/8/3/b/83b46bf2e3b8f1c19c688a5c32cc1c58935614c1.png)

Copied files back to the old path. Scan library, nothing picked up, everything still shown as unavailable; HOWEVER plex will play the media.

I can add new content to the new path and plex picks it up during a scan.

Any procedure for moving DVR media? I’m fine with digging into the database if I have to.

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 5, 2022, 12:47am UTC](https://forums.plex.tv/t/move-dvr-media/791539/2 "2022-05-05T00:47:12Z")

</div>

Solved this by screwing with the database.

First editing the `media_parts` table following instructions here: [[HowTo] Plex database modification - Moving media the right/wrong way - #10 by jelwell](https://forums.plex.tv/t/howto-plex-database-modification-moving-media-the-right-wrong-way/126701/10)

I didn’t have to do any of the other 4 updates in that post (I already manually updated the library paths and the others didn’t apply).

Then I had to `NULL` out the `deleted_at` values in the `media_parts` AND `media_items` tables.

No idea why scanning the library didn’t un-delete the files after it “should have” found them again. Maybe a bug in the server?

**Edit** : This took a little bit more screwing around as after a little bit the libraries with the DVRed items became completely corrupted. Good thing I copied the DB before doing anything.

I think this resolves it, starting from the original database. I ran the following commands with current directory where the database is stored (have a backup).

```nohighlight
"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "com.plexapp.plugins.library.db" "UPDATE metadata_items SET deleted_at= NULL"

"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "com.plexapp.plugins.library.db" "UPDATE media_items SET deleted_at= NULL"

"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "com.plexapp.plugins.library.db" "UPDATE media_parts SET deleted_at= NULL"

"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "com.plexapp.plugins.library.db" "UPDATE media_parts SET file= replace(file, 'L:\Libraries\Media\Videos\DVR\', 'L:\Media\Videos\DVR\') where file like '%L:\Libraries\Media\Videos\DVR\%'"

```

In the final command you’ll need to replace your original and new paths accordingly.

Basically this edit is the same as the original but I also had to `NULL` the `deleted_at` values in the `metadata_items` table. I ended up using the plex -sqlite command to do this because of a tokenizer error when attempting in DB Browser for SQLLite. This comment pointed me in the right direction ([Can no longer update library database with sqlite3 - #30 by bpalloni](https://forums.plex.tv/t/can-no-longer-update-library-database-with-sqlite3/701405/30)).

I will update this again if I have further issues, but I feel confident this is resolved this time.

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 5, 2022, 3:05am UTC](https://forums.plex.tv/t/move-dvr-media/791539/3 "2022-05-05T03:05:14Z")

</div>

I must have missed something because after scanning the media is showing the trash can icon again… but can still play the items.

 ![image](https://global.discourse-cdn.com/plex/original/4X/2/d/a/2dac194cfc3677034f8fa7a8cbf72c7bf79e4632.jpeg)

Doesn’t show unavailable in the get info page.

 ![image](https://global.discourse-cdn.com/plex/original/4X/e/7/8/e78695ee9250a14b57946a4d24c610a951c243b5.png)

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 5, 2022, 2:50pm UTC](https://forums.plex.tv/t/move-dvr-media/791539/4 "2022-05-05T14:50:29Z")

</div>

Found this similar issue, with the solution being to do the [plex dance](https://forums.plex.tv/t/the-plex-dance/197064), but [plex dance](https://forums.plex.tv/t/the-plex-dance/197064) won’t work on DVR content.

> [@Plex showing season "unavailable" but it is available and I can play the episodes](https://forums.plex.tv/t/plex-showing-season-unavailable-but-it-is-available-and-i-can-play-the-episodes/780820/7):
>
> Hm… I searched for “corrupt” or “malformed” - no results. regarded to this tv show: Mar 16, 2022 10:56:02.523 [0x7f356a831b38] DEBUG - Scanner: Processing directory /mnt/serien/24/Season 07 (parent: yes) Mar 16, 2022 10:56:02.575 [0x7f356a831b38] DEBUG - Skipping over directory ‘24/Season 07’, as nothing has changed; removing 24 media items from map. There are a lot of folders yes, but is this affected when I’m not using the auto-discover feature? And new added files are shown up correct…

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 6, 2022, 3:16pm UTC](https://forums.plex.tv/t/move-dvr-media/791539/5 "2022-05-06T15:16:06Z")

</div>

bump 1

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 9, 2022, 2:46pm UTC](https://forums.plex.tv/t/move-dvr-media/791539/6 "2022-05-09T14:46:03Z")

</div>

bump 2

---

<div class="post-metadata">

**Author:** ![ReenigneArcher](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reenignearcher/32/276300_2.png) [@ReenigneArcher](https://forums.plex.tv/u/ReenigneArcher)\
**Post date:** [May 12, 2022, 3:30am UTC](https://forums.plex.tv/t/move-dvr-media/791539/7 "2022-05-12T03:30:59Z")

</div>

bump 3

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [August 10, 2022, 3:31am UTC](https://forums.plex.tv/t/move-dvr-media/791539/8 "2022-08-10T03:31:52Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
