{"id":16577024,"url":"https://github.com/abdullahkhawer/simple-etcd-backup-restore","last_synced_at":"2025-10-29T04:32:04.739Z","repository":{"id":65742971,"uuid":"472378834","full_name":"abdullahkhawer/simple-etcd-backup-restore","owner":"abdullahkhawer","description":"A simple etcd backup and restore solution based on bash/shell scripts to backup/restore data from/to etcd in JSON format with the ability to compress/decompress the backup file and upload/download it on/from AWS S3.","archived":false,"fork":false,"pushed_at":"2024-06-05T18:42:31.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-01T22:22:31.458Z","etag":null,"topics":["aws","aws-s3","backup","backup-utility","bash","compress","decompress","etcd","etcd-backup","etcd-cluster","etcd-restore","etcd2","etcd3","etcdv2","etcdv3","json","restore","restore-utility","shell","tar"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdullahkhawer.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}},"created_at":"2022-03-21T14:39:43.000Z","updated_at":"2024-06-05T18:42:40.000Z","dependencies_parsed_at":"2023-02-07T16:35:11.431Z","dependency_job_id":null,"html_url":"https://github.com/abdullahkhawer/simple-etcd-backup-restore","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahkhawer%2Fsimple-etcd-backup-restore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahkhawer%2Fsimple-etcd-backup-restore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahkhawer%2Fsimple-etcd-backup-restore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahkhawer%2Fsimple-etcd-backup-restore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahkhawer","download_url":"https://codeload.github.com/abdullahkhawer/simple-etcd-backup-restore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768424,"owners_count":19527197,"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":["aws","aws-s3","backup","backup-utility","bash","compress","decompress","etcd","etcd-backup","etcd-cluster","etcd-restore","etcd2","etcd3","etcdv2","etcdv3","json","restore","restore-utility","shell","tar"],"created_at":"2024-10-11T22:09:39.163Z","updated_at":"2025-10-29T04:32:04.383Z","avatar_url":"https://github.com/abdullahkhawer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-etcd-backup-restore\n\n-   Founder: Abdullah Khawer (LinkedIn: https://www.linkedin.com/in/abdullah-khawer/)\n-   Version: v1.0\n\n## Introduction\n\nA simple etcd backup and restore solution based on bash/shell scripts to backup/restore data from/to etcd in JSON format with the ability to compress/decompress the backup file and upload/download it on/from AWS S3.\n\nBasically, the backup script actually fetches all the keys along with their values from the latest revision and store them in a file in a JSON format while the restore script actually puts all the keys along with their values using the JSON format file that we just prepared.\n\n## Features\n\n-   Works even if authentication is enabled on etcd.\n-   You can compress the backup file if you want.\n-   You can get/put the backup files from/into AWS S3 bucket respectively if required.\n\n## Benefits\n\n-   Speeds up the process of backup and restore.\n-   Reduces the size of backup files.\n-   Data remains readable as JSON.\n\n## Components Used\n\nFollowing are the components used in this framework:\n-   etcd key-value store/database.\n-   Bash/Shell scripts having the main logic for backup and restore data in etcd.\n-   etcdctl to communicate with etcd.\n-   sed for data formatting.\n-   jq to convert data into JSON.\n-   tar to compress data.\n-   AWS S3 Bucket to store backup files.\n-   AWS CLI to access AWS S3 bucket.\n\n## Usage Notes\n\n### Backup\n\n```\netcd-backup.sh - Backup data from etcd in .json format file. Compress and/or upload it in .tar format to AWS S3 bucket if desired.\n\nUsage: etcd-backup.sh [Options]\n\nOptions:\n-h, --help                           show brief help\n--host=ETCD_HOST                     specify etcd host (e.g., 172.168.0.4:2379)\n--user=ETCD_USER                     specify etcd username (e.g., root)\n--password=ETCD_PASSWORD             specify etcd password (e.g., password)\n--compress=ENABLE_COMPRESSION        specify whether to compress data or not (e.g., true)\n--s3-bucket=BACKUP_S3_BUCKET_PATH    specify AWS S3 bucket name with path if any (e.g., my-s3-bucket/backups)\n\nExamples:\nbash etcd-backup.sh\nbash etcd-backup.sh --host=172.168.0.5:2379\nbash etcd-backup.sh --host=172.125.0.5:2379 --compress=true\nbash etcd-backup.sh --host=172.168.0.5:2379 --compress=true --s3-bucket=my-s3-bucket/backups\n```\n\n### Restore\n\n```\netcd-restore.sh - Restore data to etcd from .json format file. Decompress and/or download it in .tar format from AWS S3 bucket if desired.\n\nUsage: etcd-restore.sh [Options]\n\nOptions:\n-h, --help                                show brief help\n--host=ETCD_HOST                          specify etcd host (e.g., 172.168.0.4:2379)\n--user=ETCD_USER                          specify etcd username (e.g., root)\n--password=ETCD_PASSWORD                  specify etcd password (e.g., password)\n--decompress=ENABLE_DECOMPRESSION         specify whether to decompress data or not (e.g., true)\n--s3-bucket=BACKUP_S3_BUCKET_PATH_FILE    specify AWS S3 bucket name with path and file name if any (e.g., my-s3-bucket/backups/etcd-backup-json-2022-10-28-16-50.tar)\n\nExamples:\nbash etcd-restore.sh\nbash etcd-restore.sh --host=172.168.0.5:2379\nbash etcd-restore.sh --host=172.125.0.5:2379 --decompress=true\nbash etcd-restore.sh --host=172.168.0.5:2379 --decompress=true --s3-bucket=my-s3-bucket/backups/etcd-backup-json-2022-10-28-16-50.tar\n```\n\n#### *Any contributions, improvements and suggestions will be highly appreciated.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahkhawer%2Fsimple-etcd-backup-restore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahkhawer%2Fsimple-etcd-backup-restore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahkhawer%2Fsimple-etcd-backup-restore/lists"}