PSA: Script to back up and restore Plex app data on a Windows system

All the script is doing is to backup the plex data folder (except of a few caches which are not necessary for restore).
It doesn’t cater specifically to collections or anything else. All it does is saving the whole plex data – which would include everything about your collections and anything else for that matter.

What you need to keep in mind about a full server backup:
Even with the saved data, you will only have a chance to a full restore if your new server installation has everything just like the old server.
That mainly applies to the type of operating system,
but also the storage location of each media file.
These must be kept the same between the old and the new server, or even restoring that large backup will not be able to preserve some of the data.
You are well advised to keep a list of the plex library root level folders and their storage adresses (i.e. drive letter plus folder name, or the address of the file server/NAS unit where they are stored)
(screenshots of each library’s “Add Folders” tab should do fine)