Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to sync/backup 2+ server's networks + members? #632

Open
PizzaProgram opened this issue Feb 20, 2025 · 1 comment
Open

How to sync/backup 2+ server's networks + members? #632

PizzaProgram opened this issue Feb 20, 2025 · 1 comment

Comments

@PizzaProgram
Copy link

It is possible to create multiple self-hosted servers (planets), which is great!

But is is not clear from documentation, how to configure to:

  • Synchronize between those?

So, if I deploy planet files, which contains multiple of these (dockerized) servers:

  • they all appear as different entities,
  • and does not seem to sync all networks & members.

Also:

  • How to backup/restore the whole server with all the members?

(Asked this at the discussion, but got no answer. That's why I open an issue instead, so it gets included in the docs.)

@sinamics
Copy link
Owner

You should only use one controller. Networks and members will not sync between multiple roots.
Multiple root servers are useful for better peer-to-peer discovery, especially if you operate in different regions, as well as redundancy for peer discovery if one goes down.

Would recommend this article:
https://docs.zerotier.com/roots/

If you need redundancy for the controller, you should set up a fallback server that can take over if the main controller goes down.

For the backup, you can do something like this ( not tested )

# First stop your containers
docker compose down

# List your volumes to find the correct names for zerotier and postgres-data.
docker volume ls

# Backup PostgreSQL data (replace VOLUME_NAME with your postgres volume name)
docker run --rm -v VOLUME_NAME:/source -v $(pwd)/backup:/backup alpine tar czf /backup/postgres-backup.tar.gz /source

# Backup ZeroTier data (replace VOLUME_NAME with your zerotier volume name)
docker run --rm -v VOLUME_NAME:/source -v $(pwd)/backup:/backup alpine tar czf /backup/zerotier-backup.tar.gz /source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants