# Importing Libraries & database from older NAS/Server?

**URL:** <https://forums.plex.tv/t/importing-libraries-database-from-older-nas-server/828719>\
**Category:** Plex Media Server\
**Tags:** server-linux, library-management\
**Created:** [January 29, 2023, 8:08am UTC](https://forums.plex.tv/t/importing-libraries-database-from-older-nas-server/828719 "2023-01-29T08:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaelXarisThunderwing](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/caelxaristhunderwing/32/277063_2.png) [@CaelXarisThunderwing](https://forums.plex.tv/u/CaelXarisThunderwing)\
**Post date:** [January 29, 2023, 8:08am UTC](https://forums.plex.tv/t/importing-libraries-database-from-older-nas-server/828719/1 "2023-01-29T08:08:47Z")

</div>

Server Version#: 1.30.2.6563  
Player Version#:Not Applicable, not a client Issue

I just had to Reinstall my NAS’s version of Debian 11 (was wanting to migrateto a larger drive to find out Debian’s default on non UEFI systems pretty much screw’d the pooch..making it impossible to do so.) just got done reconfiguring Samba, and installing Plex , as well copying data over to thier Respective Samba shares. ((my content for my plex server resided in one of the 2…))

i Reeeealy dont want to setup the database for my libraries all over again due to alot of the content wasn’t coming up by default and i had to manually set a few tv shows w/ their correct tvdb listings. i still have the original hard drive, for the most part everything’s intact.

i want to make sure i have the gist of 2 articles correct  
[https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) & [https://support.plex.tv/articles/201370363-move-an-install-to-another-system/](https://support.plex.tv/articles/201370363-move-an-install-to-another-system/)

i should be able to grab the Server Data directory from “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/” off the old drive and plop it down on the New one, restart, make sure directories line up (they roughly do.)and Rescan? or am i incorrect?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [January 29, 2023, 8:30am UTC](https://forums.plex.tv/t/importing-libraries-database-from-older-nas-server/828719/2 "2023-01-29T08:30:53Z")

</div>

> [@CaelXarisThunderwing](#):
>
> i should be able to grab the Server Data directory from “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/” off the old drive and plop it down on the New one, restart, make sure directories line up (they roughly do.)and Rescan? or am i incorrect?

Yes. Strongly recommend:

1. WIth PMS stopped
2. Move existing “Library” out of the way.
3. Tar pipe from old to use as new current
4. chown it all

```auto
sudo bash

# Move current which will not be used out of the way
cd /var/lib/plexmediaserver
mv Library Library.unused

# Use tar to preserve everything (cp is much slower & doesn't preserve links)
cd /path/to/old/var/lib/plexmediaserver
tar cf - ./Library | (cd /var/lib/plexmediaserver ; tar xf - )

# fix ownership
chown -R plex:plex ./Library

```

Assuming all the mount points align and permissions allow plex to read, you’re good to go

---

<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:** [April 29, 2023, 8:30am UTC](https://forums.plex.tv/t/importing-libraries-database-from-older-nas-server/828719/3 "2023-04-29T08:30:54Z")

</div>

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