{"id":31619452,"url":"https://github.com/multiversx/mx-chain-db-archive-scripts","last_synced_at":"2025-10-06T14:06:34.608Z","repository":{"id":134883989,"uuid":"528526086","full_name":"multiversx/mx-chain-db-archive-scripts","owner":"multiversx","description":"Scripts useful for managing Node's database (archive / extract, upload / download)","archived":false,"fork":false,"pushed_at":"2024-03-28T12:36:44.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-04-01T15:08:36.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiversx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-24T17:27:31.000Z","updated_at":"2023-01-04T19:10:18.000Z","dependencies_parsed_at":"2024-01-22T21:07:36.252Z","dependency_job_id":"87f3d310-dc4a-400c-90bd-f7d972c7884b","html_url":"https://github.com/multiversx/mx-chain-db-archive-scripts","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/multiversx/mx-chain-db-archive-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-chain-db-archive-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-chain-db-archive-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-chain-db-archive-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-chain-db-archive-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiversx","download_url":"https://codeload.github.com/multiversx/mx-chain-db-archive-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-chain-db-archive-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278621844,"owners_count":26017253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-06T14:06:32.061Z","updated_at":"2025-10-06T14:06:34.602Z","avatar_url":"https://github.com/multiversx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mx-chain-db-archive-scripts\n\nScripts useful for managing incremental archives of Node's database.\n\nFeatures:\n - archive / extract\n - upload / download\n\n## Prerequisites\n\n```\npip3 install -r ./requirements.txt\n```\n\n## Archive `Epoch_*` and `Static`\n\n```\nPYTHONPATH=. python3 ./archive_py/archive.py --input-folder=~/db/T --output-folder=~/db-archived --epochs=0:10 --shard=0 --include-static\n```\n\n## Upload archives to DO Spaces or Amazon S3\n\n```\nexport S3_ENDPOINT=https://fra1.digitaloceanspaces.com\nexport S3_REGION=fra1\nexport S3_ACCESS_KEY=DO000000000000000000\nexport S3_BUCKET=example-bucket\n\nPYTHONPATH=. python3 ./archive_py/upload.py --folder=~/db-archived --endpoint=${S3_ENDPOINT} --region=${S3_REGION} --access-key=${S3_ACCESS_KEY} --bucket=${S3_BUCKET} --prefix=foo/bar\n```\n\nYou will be prompted to enter the S3 secrey key.\n\nFiles will be uploaded with `ACL == public-read`.\n\n## Download archives\n\n```\nexport URL=https://example-bucket.fra1.digitaloceanspaces.com\nPYTHONPATH=. python3 ./archive_py/download.py --folder=~/db-downloads --url=${URL}/foo/bar --epochs=0:10 --include-static\n```\n\n## Extract archives\n\n```\nPYTHONPATH=. python3 ./archive_py/extract.py --input-folder=~/db-downloads --output-folder=~/db-extracted\n```\n\n## Move \u0026 symlink epoch folders\n\n```\nPYTHONPATH=. python3 ./archive_py/move_link_epochs.py --input-folder=~/db/T --output-folder=~/place/db/T\n```\n\n## Remove old epochs\n\n```\nPYTHONPATH=. python3 ./archive_py/remove_epochs.py --folder=~/db/T --epochs=0:1000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-chain-db-archive-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiversx%2Fmx-chain-db-archive-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-chain-db-archive-scripts/lists"}