[ZK Stack] - How to migrate self deployed ZkSync hyperchain to new machine? #754
-
Team or ProjectNo response Module Affected
Rust Version1.80.1 Operating System
Issue DescriptionWe are running zksync hyperchain on limit system specs and we know in some time we need to move to a new bigger machine. We are right now exploring ways to migrate whole ecosystem + chain with Postgres DB to a new machine. So when after migration is completed, we can run the server from last state. Expected BehaviorNA Current BehaviorNA Repository Link (if applicable)No response Additional DetailsNo response Prior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Migrating your self-deployed ZKsync hyperchain to a new machine involves several steps, primarily focused on transferring your current system's data and configurations to the new environment. Here’s a general approach to achieve this:
For detailed steps tailored to your specific setup, you might want to consult with a system administrator or a professional with experience in migrating complex systems. Additionally, consider visiting the ZKsync developers discussions on Github for more in-depth guidance or community support. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Hey! We don't really have a step-by-step guide for that and it depends on the actual setup a lot, so it's hard to provide a precise answer.
Regardless of the mode, the only stateful part of the server (besides Postgres) is RocksDB data (Merkle tree and state keeper cache). You need to shutdown the server, move this data to a new machine, update the configuration if any paths have changed, and then run the sequencer on the new machine. Finally, I would really recommend doing that on some test network first to get experience. The process isn't complex, and any problem except Postgres data loss should be recoverable (e.g. even Merkle tree can be rebuilt from scratch), but this way you can make it easier for yourself and avoid prolonged downtime and frustration. |
Beta Was this translation helpful? Give feedback.
Hey! We don't really have a step-by-step guide for that and it depends on the actual setup a lot, so it's hard to provide a precise answer.
It's also not clear if some downtime is acceptable for you. I'll assume yes; if not -- the situation may become significantly more complex.
However, here are some general advices: