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

[Follower ] Backup / restore follower DB #1051

Merged
merged 1 commit into from
Feb 13, 2025
Merged

[Follower ] Backup / restore follower DB #1051

merged 1 commit into from
Feb 13, 2025

Conversation

musitdev
Copy link
Contributor

@musitdev musitdev commented Feb 12, 2025

Summary

  • RFCs: Link to RFC, Link to RFC, or $\emptyset$.
  • Categories: any of protocol-units, networks, scripts, util, cicd, or misc.
    Add backup/restore command to the follower node

Changelog

Move the chunk part in the S3 part because it's more logic. The chunks are needed by S3 communication.
Add docker files to backup / restore/pull.
Add the follower backup docker script; it still needs to be tested—no need for a follower node.

Testing

First, run a local node to create a DB in .movement.

Build the full node exe: cargo build -p movement-full-node

Unit Test:

RUST_BACKTRACE=1 AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY="<key>" AWS_REGION=us-west-1 cargo test -p syncador test_archive_split -- --nocapture

Local backup command

DOT_MOVEMENT_PATH="$(pwd)/.movement" AWS_REGION=us-west-1 AWS_ACCESS_KEY_ID="<key>" AWS_SECRET_ACCESS_KEY="<key>" target/debug/movement-full-node backup save-and-push

Local retore command

DOT_MOVEMENT_PATH="$(pwd)/.movement" AWS_REGION=us-west-1 AWS_ACCESS_KEY_ID="<key>" AWS_SECRET_ACCESS_KEY="<key>" target/debug/movement-full-node backup restore

Restart the node which should start correctly.

Outstanding issues

The backup follower node docker script hasn't been tested. Currently, there's an issue with the sh command that is not seen. Short term we can do a backup manually.
Partner follower node are not concerned by this issue.

Copy link
Contributor

@andygolay andygolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran all three tests locally. They all pass.

I have not reviewed the code in much detail but I looked through the overlays and they seem to make sense.

@0xmovses 0xmovses merged commit d12f243 into main Feb 13, 2025
116 of 123 checks passed
mcmillennick pushed a commit that referenced this pull request Mar 9, 2025
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

Successfully merging this pull request may close these issues.

3 participants