{"id":22325083,"url":"https://github.com/rogercoll/replica","last_synced_at":"2025-03-26T05:44:01.356Z","repository":{"id":57616293,"uuid":"382801413","full_name":"rogercoll/replica","owner":"rogercoll","description":"Generate and replicate backups to any system","archived":false,"fork":false,"pushed_at":"2021-07-24T18:37:08.000Z","size":1185,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T14:52:51.827Z","etag":null,"topics":["backup","go","replication","ssh","targz"],"latest_commit_sha":null,"homepage":"","language":"Go","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/rogercoll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-04T08:29:44.000Z","updated_at":"2021-07-09T11:26:42.000Z","dependencies_parsed_at":"2022-08-27T07:31:56.051Z","dependency_job_id":null,"html_url":"https://github.com/rogercoll/replica","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2Freplica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2Freplica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2Freplica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2Freplica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogercoll","download_url":"https://codeload.github.com/rogercoll/replica/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598310,"owners_count":20641884,"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","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","go","replication","ssh","targz"],"created_at":"2024-12-04T02:10:07.819Z","updated_at":"2025-03-26T05:44:01.327Z","avatar_url":"https://github.com/rogercoll.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Replica\n\nReplica is a tool to generate directory backups and replicate them in multiple environments. It is a plugin-driven application, and for the moment it distinguishes 2 plugin types:\n\n1. [Backup Plugins](#backup-plugins) generate backups of a system\n2. [Distributor Plugins](#distributor-plugins) distributes the previous backups among diferent systems\n\nNew plugins are designed to be easy to contribute, pull requests are super welcomed. For example, databases backup plugins or cloud services distributor like AWS S3.\n\n## Installation:\n### From Source:\n\nReplica requires Go version 1.14 or newer, the Makefile requires GNU make.\n\n1. [Install Go](https://golang.org/doc/install) \u003e=1.14 (1.15 recommended)\n2. Clone the Replica repository:\n   ```\n   git clone https://github.com/rogercoll/replica.git\n   ```\n3. Run `make` from the source directory\n   ```\n   make build\n   sudo cp ./replica /usr/bin\n   ```\n\n## Backup Plugins\n\n* [targz](./plugins/backup/targz)\n\n## Distributor Plugins\n\n* [local](./plugins/distributors/local)\n* [ssh](./plugins/distributors/ssh)\n\n## Configuration\n\nReplica will try to find a default config file at these locations (in order):\n1. $REPLICA_CONFIG_PATH\n2. $HOME/.replica/replica.conf\n3. /etc/replica/replica.conf\n\nExample file:\n\n```toml\n[[backup.targz]]\n  paths = [\"/home/neck/influxd\"]\n  # Time format to be used in the backup file names (https://golang.org/pkg/time/#Time)\n  # Default is layoutISO = \"2006-01-02\"\n\n[[distributor.local]]\n  destinations = [\"/home/neck/backups/\", \"/home/neck/backups/test1/\", \"/home/neck/backups/test2/\"]\n\n[[distributor.ssh]]\n  hosts = [\"192.168.1.90:22:pi\"]\n  passwords = [\"\"]\n  destinations = [\"/home/pi/extBackups/\"]\n```\n\nThe file [plugins](./Plugins.md) contains additional information on how to check and get a sample configuration for each available plugin.\n\n## How to use it?\n\nOnce a configuration file has been defined with the desired plugins, you can simple run it:\n\n```bash\nreplica\n```\n\nThe best would be to add the execution as a cron job, thus automatically make and replicate backups when needed.\n\n**The program workflow is based on [Telegraf](https://github.com/influxdata/telegraf) agent, kudos to them for the great work!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogercoll%2Freplica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogercoll%2Freplica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogercoll%2Freplica/lists"}