Since Swarm has a built-in Raft database (called Raft logs), this is cut and dry, you just need to backup everything in /var/lib/docker/swarm on a Manager node.
The negatives are that 1. That Manager’s Docker Engine should be stopped during file backups, which means you need to take steps to ensure the Swarm still has quorum while backups happen, and 2. There is no built-in way to automate this. You’ll need to create or find scripts/tools that do this outside a Docker container on a specific server, and then move those backups off-disk. Bummer.