{"id":31646285,"url":"https://github.com/codefresh-io/cf-backup-consul","last_synced_at":"2025-10-07T05:21:55.826Z","repository":{"id":10294536,"uuid":"63217611","full_name":"codefresh-io/cf-backup-consul","owner":"codefresh-io","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-21T03:17:42.000Z","size":13,"stargazers_count":0,"open_issues_count":6,"forks_count":3,"subscribers_count":20,"default_branch":"develop","last_synced_at":"2025-04-25T14:59:40.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefresh-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-13T05:39:50.000Z","updated_at":"2017-01-26T14:34:54.000Z","dependencies_parsed_at":"2022-08-28T08:41:24.195Z","dependency_job_id":null,"html_url":"https://github.com/codefresh-io/cf-backup-consul","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codefresh-io/cf-backup-consul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-backup-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-backup-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-backup-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-backup-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefresh-io","download_url":"https://codeload.github.com/codefresh-io/cf-backup-consul/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-backup-consul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"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-07T02:00:06.786Z","response_time":59,"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-07T05:21:36.688Z","updated_at":"2025-10-07T05:21:55.809Z","avatar_url":"https://github.com/codefresh-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codefresh Consul backup to S3 bucket and restore\n\nconfig.js define consul address and s3 bucket\n\n### Backup\n\ndocker run example:\n\n```bash\ndocker run --rm -v \"/opt/codefresh/cf-backup-consul/aws-credentials:/root/.aws/credentials:ro\" \\\n-v \"/opt/codefresh/cf-backup-consul/config.js:/cf-backup-consul/config.js:ro\" --net=host codefresh/cf-backup-consul:develop\n```\n\n### Restore\n\n##### download consul-backup-*-zip from s3\n\n```bash\naws s3 cp s3://cf-backup-consul/google_production/consul-backup-2016-07-19_9-57-02-cf-usc1b-consul-3.zip /tmp/\nunzip consul-backup-2016-07-19_9-57-02-cf-usc1b-consul-3.zip\n\n```\n\n##### restore \n\nset consul path in config.js\n\nUsage: node restore.js nodes|kv backup_file.json filterPattern\n\nExample:\n```bash\n\n# restore all nodes \n./restore.js nodes /tmp/2016-07-25_9-57-02-nodes_services.json \n\n# restore specific nodes by regexp\n./restore.js nodes /tmp/2016-07-25_9-57-02-nodes_services.json 'docker-node-(0001|0005)'\n\n\n# restore all kv\n ./restore.js kv ~/consul_restore/2016-07-25_9-57-02-kv.json \n\n# restore specific kv by regexp\n ./restore.js kv ~/consul_restore/2016-07-25_9-57-02-kv.json 'services/docker-node/(node-ironsource-52-19-18-28|.*-0001)'\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fcf-backup-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefresh-io%2Fcf-backup-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fcf-backup-consul/lists"}