Jellyfin Forum
Changing HDD on server - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: Changing HDD on server (/t-changing-hdd-on-server)



Changing HDD on server - troothdotcom - 2023-06-29

I will be upgrading my servers HDD from a 2 TB to a 8 TB drive and I have quite a few questions I was hoping you guys could help me with. First I'm running my server on a very old laptop so I can only access one USB drive at a time so I'll have to replace my current HHD completely. I am running Ubuntu server OS and I'm hoping to mount the new drive to the existing mount location of the old HHD so I don't have to change all the Library settings. Second I'd hate to start over with the 2 TB of content I already have. Generating the BIF files and all the other necessary stuff takes forever what's the best way to copy all the necessary information to the new drive so it passes all the same permissions and files to the new drive? 

After writing all that I'm wondering if I'm better off just biting the bullet and starting off with all fresh installs? Thanks in advance.


RE: Changing HDD on server - TheDreadPirate - 2023-06-29

So the hard drive that contains the OS, and the jellyfin install, is NOT being replaced, correct? Just the hard drive with your library?

Stop the jellyfin service
Mount the new HDD in the same location
Migrate your library (cp -Rp, the -p preserves the permissions)
Start Jellyfin

As long as Jellyfin isn't running and your media is in the same location, the upgrade should be transparent.


RE: Changing HDD on server - Tim - 2023-06-30

Here is the man page on the copy command that @TheDreadPirate described. I agree with him that this is a good method. Try to keep it simple.


RE: Changing HDD on server - Host-in-the-Shell - 2023-07-11

Personally, I would consider using Clonezilla. Recently I had to clone my server from a laptop to a dedicated computer I built, and the disk cloning was simply flawless. All I had to do was assign the old IP to the new pc and change the name of the network interface; every single one of my services were preserved intact and required no manual intervention: jellyfin, cockpit, qbittorrent-nox, pi-hole... same for any system configuration and data.

The only caveat is that you'll have to make a bootable Clonezilla Live media and use it in your pc with the old HDD to clone it, as it needs the disks to be unmounted and not in use before they are cloned. Of course, you can create one with any bootable device such as a USB stick. If you have an Arch installation media laying around, it comes with Clonezilla already installed in it. There's extensive documentation available on almost everything you can do.