{"id":16516222,"url":"https://github.com/aphistic/consync","last_synced_at":"2025-06-17T11:05:07.780Z","repository":{"id":136842173,"uuid":"81706016","full_name":"aphistic/consync","owner":"aphistic","description":"consync is a tool to help with managing Consul key/value data across multiple datacenters","archived":false,"fork":false,"pushed_at":"2017-03-29T04:46:50.000Z","size":14,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T05:21:51.576Z","etag":null,"topics":["consul"],"latest_commit_sha":null,"homepage":null,"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/aphistic.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":"2017-02-12T05:49:16.000Z","updated_at":"2022-11-26T15:35:21.000Z","dependencies_parsed_at":"2023-06-05T15:45:21.795Z","dependency_job_id":null,"html_url":"https://github.com/aphistic/consync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fconsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fconsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fconsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fconsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aphistic","download_url":"https://codeload.github.com/aphistic/consync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549117,"owners_count":19980476,"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":["consul"],"created_at":"2024-10-11T16:20:06.762Z","updated_at":"2025-03-02T18:16:49.881Z","avatar_url":"https://github.com/aphistic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# consync\nconsync is a tool to help sync or diff Consul key/value data across multiple datacenters.\n\nPlease note that consync is in early development and does not have full test coverage yet.  It\nseems to be working correctly but until tests are implemented completely use with caution!\n\n\n## Installation\n\nconsync uses [glide](https://github.com/Masterminds/glide) to handle dependencies, so be sure to\nhave that installed first.  Once you have glide installed, install the dependencies required to\nbuild consync by typing:\n\n```bash\n$ glide install\n```\n\n__Note:__ If you have a problem installing packages from `gopkg.in` when installing dependencies,\nsee [gopkg #50](https://github.com/niemeyer/gopkg/issues/50) for more information and a workaround.\n\nAfter the dependencies have been installed, consync can be built and installed using:\n\n```bash\n$ go install\n```\n\nThis will put the consync binary in `$GOPATH/bin` so you can use it as a normal command if you have\nthat directory on your execution path.\n\n\n## Usage\n\nOne thing to note with consync is that the URLs it expects on the command line are not the same as\nthe URLs used if you were to connect to the Consul REST API.  consync URLs only require the path\nfrom the beginning of the key/value path instead of the full REST path.  For example, if you\nwant to see the difference between `/` on one server and `/my/path` on another you would use\nsomething like `http://10.10.10.10:8500/` for the \"from\" and `http://10.10.10.11:8500/my/path` for\nthe \"to\".\n\n### Displaying Differences\n\nconsync provides a `diff` command to display the differences between two paths in Consul.  These paths\ncan be in the same data center at different paths, different data centers at the same path or even\ndifferent data centers at different paths.\n\nBy default a diff will only show a diff of the keys in the specified directory.  To perform a diff\non both keys and directories, provide the `--recursive` (or `-r`) parameter.\n\nFor example, to view the difference between the same path for two data centers in the same cluster,\nyou could do:\n\n```bash\n$ consync diff \\\n    -f http://consul.host/app/settings --from-dc dc1 --from-token b3e...9a2 \\\n    -t http://consul.host/app/settings --to-dc dc2 --to-token b3e...9a2\n```\n\n### Syncing Changes\n\nconsync also provides a `sync` command to modify a target path to match a source path.  This includes\nadding any new keys, updating any modified keys and removing any keys that exist in the target\nbut not in the source.  This command functions similar to the `diff` command as far as the parameters\nyou can provide but it also includes an additional `--execute` (or `-e`) parameter. If the\nexecute parameter is not provided, consync will only display the changes it would make instead of\nactually applying them.  This is to make sure changes aren't accidentally applied to a target.\n\nBy default syncing will only sync keys in the specified directory.  To sync keys and directories,\nprovide the `--recursive` (or `-r`) parameter.\n\nAn example of using the `sync` command is as follows:\n\n```bash\n$ consync sync \\\n    -f http://consul.host/app/settings --from-dc dc1 --from-token b3e...9a2 \\\n    -t http://consul.host/app/settings --to-dc dc2 --to-token b3e...9a2 \\\n    --execute\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fconsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faphistic%2Fconsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fconsync/lists"}