A while back I built a media server for the family and it’s been great. What’s not been great is maintaining it. For the most part it doesn’t need a lot of work, it just hums away in the corner but about every six months the software needs updating. The problem is that’s just long enough for me to start forgetting how to do it. I’m hoping to solve this issue once and for all by writing it all down.
Background
There are a number of articles on the setup of this server. The ones below are the the most relevant for this article but I don’t hink you really need to read through them in detail.
Existing Setup
I often forget what the existing setup looks like so here are a few notes. Almost everything said here is relevant for the download server as well.
The server is running Proxmox which has a virtual machine for the media server. The virtual machine is is running Debian and has 10Gb of memory allocated to it, which should be ample. The media server has two virtual disks assigned to it, one is 64GB and contains the OS the other is 128GB and contains the settings for the various applications running on the machine. This is the result of a screw up where the smaller disk ran out of space due to the amount of stuff Jellyfin caches. The (edited) fstab is shown below. The last line is repeated for each mount, one for each media type. Note the mount at /data/extra for the application settings, I struggled with picking a good name 🙂
UUID=915cb588-9b48-4555-b874-c99e074122b8 / ext4 errors=remount-ro 0 1 UUID=e24f54bb-2596-49c8-968d-69e450b52a68 /data/extra ext4 defaults,nofail 0 0 UUID=54249c02-b8df-42a0-bad1-4edd79ad53cb none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 //fileserver.wobblycogs.co.uk/media_type /data/mnt/media_type cifs rw,vers=3.0,credentials=/root/.fileserver_smbcredentials,dir_mode=0775,file_mode=0775,uid=1000,gid=9999
The IP address of the media server can be found in the DHCP server. It’s also in the password list in the hardware section. Login with SSH using the username and password.
The applications installed on the media server at the moment are: calibre, calibre-web, dashy, jellyfin, jellyseer, mariadb, mealie, navidrome, vikunja.
Backups
The data that really needs backing up is under /data/extra as this contains the settings for the various Docker based applications that are installed on the machine. It wouldn’t be impossible to recreate this if it was lost but it would be irritating. For a simple backup before doing an update I just rsync the data on to the scratch partition of the media array. This is far from ideal but it is quick. From the /data directory at a command line runt he command below. This backup takes a while as it doesn’t exclude the absolutely massive Jellyfin cache.
rsync -r extra /data/mnt/scratch/media_server_backup/
Note the lack of forward slash at the end of the the extra directory. This tells Rsync to copy the directory as well. If you added a forward slash it could copy the contents of extra into the destination.
Note that with the above command a few files don’t get copied. This is mostly Mariadb and a couple of open log files. I don’t think the MariaDB is doing anything useful.
Updates
To update the Docker containers open Portainer, select the server, and then list the stacks. Select the stack you would like to update. On the stack details page select the editor tab. Click the “update the stack” button and select the re-pull option on the dialog window that pops up.
In the containers section there is a tiny button that lets you view the logs for the container which can show you how the update is progressing.
Remember: calibre takes an unusually long time to update and is very fragile. Since version 8.6 the package can only be access using HTTPS on port 8181.