Restoring database causes 2 servers and 2 system dbs errors

I finally found a solution for this.

If you want to restore a stand-alone Neo4j server including things like roles which are stored in the system database, then you need to restore the system database. If you just restore the system database you end up with two system databases as above. To stop this happening you need to copy the system_id file from the /var/lib/neo4j/data directory from the original server to the new server. When copying the file make sure it has the correct permissions, namely owner and group of 'neo4j'. Once you have done this you can restore the system database (and probably any other databases you require). You will need to stop the service (sudo systemctl stop neo4j) before you copy the system_id file and restore the system database.

Interestingly the documentation talks about how important it is to backup the system database but it doesn't talk about how to restore it and there's no mention of the server_id file at all.

I was wondering if there is a way to set the server id without copying files. An admin operation or something. I couldn't find anything.