{"id":24649028,"url":"https://github.com/xmigrate/blxrep","last_synced_at":"2025-08-02T09:14:06.631Z","repository":{"id":274158295,"uuid":"917825054","full_name":"xmigrate/blxrep","owner":"xmigrate","description":"eBPF based sector level disk replication tool for disaster recovery purpose","archived":false,"fork":false,"pushed_at":"2025-02-07T06:34:09.000Z","size":13748,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T11:11:14.216Z","etag":null,"topics":["backup","disaster-recovery","ebpf","sector-level-recovery"],"latest_commit_sha":null,"homepage":"http://blxrep.xmigrate.cloud/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmigrate.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,"publiccode":null,"codemeta":null}},"created_at":"2025-01-16T18:02:43.000Z","updated_at":"2025-02-26T21:01:49.000Z","dependencies_parsed_at":"2025-03-20T18:47:49.856Z","dependency_job_id":"1fab36d3-4fdb-421f-86a5-b429f8f2a90e","html_url":"https://github.com/xmigrate/blxrep","commit_stats":null,"previous_names":["xmigrate/blxrep"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/xmigrate/blxrep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fblxrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fblxrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fblxrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fblxrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmigrate","download_url":"https://codeload.github.com/xmigrate/blxrep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fblxrep/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268361780,"owners_count":24238530,"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-08-02T02:00:12.353Z","response_time":74,"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":["backup","disaster-recovery","ebpf","sector-level-recovery"],"created_at":"2025-01-25T17:15:24.112Z","updated_at":"2025-08-02T09:14:06.608Z","avatar_url":"https://github.com/xmigrate.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" alt=\"blxrep logo\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n# blxrep\n\nblxrep is a powerful tool designed for live data replication of disks over a network. It operates in two modes: dispatcher and agent, allowing for efficient and flexible disaster recovery setup.\nblxrep tracks the changes that happen on disk at sector level using eBPF tracepoints.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n  - [Starting blxrep](#starting-blxrep)\n  - [Dispatcher Commands](#dispatcher-commands)\n- [Modes of Operation](#modes-of-operation)\n- [TUI mode](#tui-mode)\n\n## Overview\n\nTraditionally, companies have relied on kernel modules for change block tracking and bitmap-based incremental backups. While functional, this approach has several limitations:\n\n1. Complex kernel module development and maintenance requiring deep kernel expertise\n2. Challenging debugging process due to kernel space operations\n3. Limited testing capabilities in kernel space\n4. Scalability constraints due to kernel-level implementation\n5. Steep learning curve for kernel module development\n6. System reboots required for kernel module loading and updates\n7. Potential for system instability and security vulnerabilities due to unrestricted kernel access\n\nblxrep modernizes this approach by leveraging eBPF tracepoints to track disk changes at the sector level. This brings several advantages:\n\n1. Simplified development through eBPF's modern tooling, extensive documentation, and active community support\n2. Enhanced debugging capabilities with user-space tools and eBPF maps\n3. Comprehensive testing framework support\n4. Better scalability through efficient event processing\n5. More approachable learning curve with high-level eBPF programming interfaces\n6. Dynamic loading without system reboots\n7. Improved safety through eBPF's verifier and sandboxed execution environment\n\n## Installation\n\n### For Debian/Ubuntu based systems (.deb)\n\n1. Download the package:\n```bash\nwget https://github.com/xmigrate/blxrep/releases/download/v0.1.0/blxrep-0.1.0-amd64.deb\n```\n2. Install the package:\n```bash\nsudo dpkg -i blxrep-0.1.0-amd64.deb\n```\n\u003e Note: If you get an error about missing dependencies, you can install them with:\n```bash\nsudo apt-get install -f\n```\n\n### For Redhat/CentOS based systems (.rpm)\n\n1. Download the package:\n```bash\nwget https://github.com/xmigrate/blxrep/releases/download/v0.1.0/blxrep-0.1.0-x86_64.rpm\n```\n2. Install the package:\n```bash\nsudo rpm -i blxrep-0.1.0-x86_64.rpm\n```\n\n## Verify the installation:\n```bash\nsudo blxrep --help\n```\n\nConfiguration file is located at `/etc/blxrep/config.yaml` by default.\nPolicy directory is located at `/etc/blxrep/policies` by default.\n\n## Policy Configuration\n\nDefault Policy configuration is located at `/etc/blxrep/policies/default.yaml` by default.\n```yaml\nname: \"default-backup-policy\" # name of the policy\ndescription: \"Backup policy for all servers\" # description of the policy\narchive_interval: 48h # archive interval\nsnapshot_frequency: \"daily\" # snapshot frequency\nsnapshot_time: \"12:00\" # snapshot time\nbandwidth_limit: 100 # bandwidth limit\nsnapshot_retention: 30 # snapshot retention\nlive_sync_frequency: 2m # live sync frequency\ntransition_after_days: 30 # transition after days\ndelete_after_days: 90 # delete after days\n\ntargets:\n  # Range pattern\n  - pattern: \"*\" # pattern of the targets which is mentioned on agent /etc/blxrep/config.yaml\n    disks_excluded: \n      - \"/dev/xvda\" # disks excluded from the policy\n```\nYou can create your own policy by creating a new yaml file in the `/etc/blxrep/policies` directory.\n\n## Post Installation\nAfter installation, enable and start the blxrep service:\n\n```bash\nsudo systemctl enable blxrep\nsudo systemctl start blxrep\n```\n\nAfter starting the blxrep service, you can see the status of the blxrep service with the following command:\n\n```bash\nsudo systemctl status blxrep\n```\n\n\n## Uninstallation\n\nTo uninstall blxrep, use the following command:\n\nFor Debian/Ubuntu:\n```bash\nsudo dpkg -r blxrep\n```\n\nFor Redhat/CentOS:\n```bash\nsudo rpm -e blxrep\n```\n\n## Configuration\n\nblxrep uses a configuration file located at `/etc/blxrep/config.yaml` by default. You can specify a different configuration file using the `--config` flag.\n\nExample configuration for agent:\n\n```yaml\nmode: \"agent\"\nid: \"hostname\"\ndispatcher-addr: \"localhost:8080\"\ndata-dir: \"/data\"\n```\n\nExample configuration for dispatcher:\n\n```yaml\nmode: \"dispatcher\"\ndata-dir: \"/data\"\npolicy-dir: \"/etc/blxrep/policies\"\n```\n\n## Usage\n\n### Starting blxrep\n\nTo start blxrep, use the `start` command:\n\n```bash\nblxrep start [flags]\n```\n\nFlags:\n| Flag | Description | Required For |\n|------|-------------|--------------|\n| `--mode` | Start mode ('dispatcher' or 'agent') | Both |\n| `--id` | Agent ID | Agent mode |\n| `--dispatcher-addr` | Dispatcher address (format: host:port) | Agent mode |\n| `--data-dir` | Data directory | Dispatcher mode |\n| `--policy-dir` | Policy directory | Dispatcher mode |\n| `--config` | Configuration file | Optional |\n\n\n## Modes of Operation\n\n### Dispatcher Mode\n\nIn dispatcher mode, blxrep manages the overall replication process. It acts as a central collector for replicating disk data from multiple servers. It requires a data directory and policy directory to be specified. All types of disk backups are collected and stored in the specified data directory. Policy directory is used to specify the policy for the disk backups for each agent.\n\n\n### Agent Mode\n\nIn agent mode, blxrep runs on individual servers to send snapshot backups and live changes to the dispatcher. It requires an agent ID, dispatcher address, and device to be specified. We need the agent ID to be unique if we are connecting multiple servers to the same dispatcher. Device is the disk that needs to be backed up and monitored for live changes.\n\n### TUI mode\n\nblxrep uses tcell for the TUI. It is a terminal UI library for Go that is easy to use and highly customizable. It is used to interact with the dispatcher and agents. With TUI mode, you can navigate throught the agegnts that are connected to the dispatcher and see the status of the disk backups. You can also mount the disk backups to any available point in time and restore the files or partitions with the help of the TUI.\n\nTo start the TUI, use the `tui` command:\n\n```bash\nblxrep tui --data-dir=\u003cdata_directory\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmigrate%2Fblxrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmigrate%2Fblxrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmigrate%2Fblxrep/lists"}