I am having a devil of a time figuring out a sound strategy for getting a new instance of Xcode Server to match a known, good state from another instance.
The root problem here is that during the first month of using Xcode Server for CI purposes, we've already seen a mysterious fatal error occur with the server which could only be fixed by resetting Xcode Server from scratch. macOS Server 5.3 complains that it cannot connect to Xcode Server because of "Error reading settings". Reading around online, it seems the macOS Server exhibits this problem for other modules, like the Wiki pages and repositories. So, I have come to believe that it is a somewhat fragile system to rely on without a reliable backup system.
So, I want to do the minimal-critical backup for the server, such that it can be restored to glory. It seems to me that the server couchdb and perhaps the local Xcode build archives would be enough. However, I cannot get access to the couchdb to do a backup, even using sudo in the command line. Opening the xcs database in Futon results in "you don't have access to this database" and an explicit log-in to Futon shows me that my admin account is not the admin, because my admin account has no couchdb account at all.
I believe the user _xcscouch has access, but I have no idea what password it decided to use for itself. Without an admin account, I believe the server's couchdb file is useless, if installed into another machine, or if the main machine is wiped and server reinstalled from scratch.
I know of no utilities within Xcode Server or macOS Server for doing a proper backup/restore.
I'm at a loss!