Skip to content

feat: backup by near-exact timestamp allow passing in --backup-strategy as a list of strings - #50

Draft
ClaytonNorthey92 wants to merge 1 commit into
mainfrom
clayton/backup-by-timestamp-2
Draft

feat: backup by near-exact timestamp allow passing in --backup-strategy as a list of strings#50
ClaytonNorthey92 wants to merge 1 commit into
mainfrom
clayton/backup-by-timestamp-2

Conversation

@ClaytonNorthey92

@ClaytonNorthey92 ClaytonNorthey92 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

these strings are of the format "<name>:<endpoint>:<timestamp>".

the only name that is valid is "ethsethead". upon receiving this list of backup strategies, sort by timestamp descending.

for each:

  • find the closest block that is greater than the timestamp given
  • call admin_stopWS to stop the WS server so that op-node cannot manipulate the chain while we're working with the data
  • use debug_setHead to set the latest block to that timestamp
  • stop the container
  • take the backup
  • repeat until all backups are taken

add tests that test not only this process, but that the restores of the backups contain the correct blocks and a geth container can start back up with those in its blockchain.

fixes #46

@ClaytonNorthey92
ClaytonNorthey92 force-pushed the clayton/backup-by-timestamp-2 branch from 39ce1e5 to beb1491 Compare August 18, 2026 22:04
@ClaytonNorthey92 ClaytonNorthey92 changed the title WIP: Backup by timestamp feat: backup by near-exact timestamp allow passing in --backup-strategy as a list of strings Aug 18, 2026
@ClaytonNorthey92
ClaytonNorthey92 force-pushed the clayton/backup-by-timestamp-2 branch 3 times, most recently from c72b078 to 1e0cec0 Compare August 18, 2026 22:49
allow passing in `--backup-strategy` as a list of strings.  these strings are of the format "<name>:<endpoint>:<timestamp>".

the only name that is valid is "ethsethead".  upon receiving this list of backup strategies, sort by timestamp descending.

for each:
* find the closest block that is greater than the timestamp given
* call admin_stopWS to stop the WS server so that op-node cannot manipulate the chain while we're working with the data
* use debug_setHead to set the latest block to that timestamp
* stop the container
* take the backup
* repeat until all backups are taken
* run tests 10 times in parallel to look for fragile tests

add tests that test not only this process, but that the restores of the backups contain the correct blocks and a geth container can start back up with those in its blockchain.

fixes #46
@ClaytonNorthey92
ClaytonNorthey92 force-pushed the clayton/backup-by-timestamp-2 branch from 903f98a to 64e0174 Compare August 19, 2026 20:11
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.

forget: redesign current retention policy strategy

1 participant