{"id":20310189,"url":"https://github.com/ktooi/ansible-role-argocd-backup","last_synced_at":"2026-05-06T19:38:54.784Z","repository":{"id":171490386,"uuid":"502506854","full_name":"ktooi/ansible-role-argocd-backup","owner":"ktooi","description":"This role is used to deploy a shell script to backup ArgoCD configuration and run it periodically by cron.","archived":false,"fork":false,"pushed_at":"2022-10-19T14:01:33.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T12:13:43.610Z","etag":null,"topics":["ansible","ansible-role","argocd","backup","backup-script"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/ktooi/argocd_backup","language":"Shell","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/ktooi.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":"2022-06-12T03:11:02.000Z","updated_at":"2022-10-24T01:21:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd133f38-696b-4b4c-88d9-90a7d3a9896a","html_url":"https://github.com/ktooi/ansible-role-argocd-backup","commit_stats":null,"previous_names":["ktooi/ansible-role-argocd-backup"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktooi%2Fansible-role-argocd-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktooi%2Fansible-role-argocd-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktooi%2Fansible-role-argocd-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktooi%2Fansible-role-argocd-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktooi","download_url":"https://codeload.github.com/ktooi/ansible-role-argocd-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241809619,"owners_count":20023787,"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":["ansible","ansible-role","argocd","backup","backup-script"],"created_at":"2024-11-14T17:30:25.426Z","updated_at":"2026-05-06T19:38:49.766Z","avatar_url":"https://github.com/ktooi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/ktooi/ansible-role-argocd-backup/workflows/CI/badge.svg)](https://github.com/ktooi/ansible-role-argocd-backup/actions?query=workflow%3ACI+branch%3Amain)\n\n# Ansible Role: argocd-backup\n\nThis role is used to deploy a shell script to backup ArgoCD configuration and run it periodically by cron.\n\nThis role does the following\n\n* Install ArgoCD configuration backup scripts.\n* Deploy a cron file to run the ArgoCD configuration backup script periodically.\n\nThis role does not do the following\n\n* Install ArgoCD.\n* Install the `argocd` command.\n\n## Requirements\n\nThere are no special requirements for this role.\n\n## How does this backup?\n\nThis role will contain the script `backup_argocd.sh` which will backup the ArgoCD configuration.\nA dedicated cron file will be placed and `backup_argocd.sh` will be run periodically.\n\n`backup_argocd.sh` works as follows.\n\n* Output configuration information with the `argocd` command (see below for a sample of the `argocd` command that `backup_argocd.sh` executes).\n\n    ```\n    argocd -n \u003cNameSpace\u003e admin export --kueconfig \u003cKubeConfigFile\u003e\n    ```\n* If the output configuration information has changed from the previous one, `gzip` it and save it as a backup.\n* Update the timestamp in the `watchdog` file when the script completes successfully (a function of `backup_argocd.sh` to monitor normal operation).\n\n## Role Variables\n\n```yaml\nargocd_backup_ns: \"argocd\"\n```\n\nSpecifies the Namespace where argocd is deployed and whose configuration is to be backed up.\n\n```yaml\nargocd_backup_dst_dir: \"/var/argocd/backup\"\n```\n\nSpecifies the directory where backups will be stored.\n\n```yaml\nargocd_backup_schedule: \"0 * * * *\"\n```\n\nSets the schedule for performing backups.\n\nSet in cron.d format.\n\n```yaml\nargocd_backup_user: root\n```\n\nSpecifies the user as which backups will be performed.\n\n```yaml\nargocd_backup_script_file: \"/usr/local/bin/backup_argocd.sh\"\n```\n\nSpecifies the full path of the file to which the backup script will be copied.\n\n```yaml\nargocd_backup_cron_file: \"/etc/cron.d/argocd-backup\"\n```\n\nSpecifies the full path of the cron file that you want the backup script to run periodically.\n\n```yaml\n# argocd_backup_kubeconfig_file:\n```\n\nSpecify the file (usually `~/.kube/config`) where you store the credentials to connect to Kubernetes.\n`argocd_backup_user` must be able to read this file.\n\nThis role will not generate or copy the file specified in `argocd_backup_kubeconfig_file`, so you should have credentials in place to connect to Kubernetes in advance.\n\nIf `argocd_backup_kubeconfig_file` is not specified, `.kube/config` under `argocd_backup_user` home directory will be specified.\n\ni.e.: `/root/.kube/config`, `/home/ktooi/.kube/config`\n\n```yaml\nargocd_backup_become_user_precheck: true\n```\n\nThis role will perform a precheck before the setup, and whether or not the user specified in ``argocd_backup_user`` should be used for the precheck.\n\n* If set to `true`, the check is performed using the user specified by `argocd_backup_user`. This is a strict check, but you can also specify the user from `ansible_user` to\nIf you cannot switch from `ansible_user` to `argocd_backup_user`, the check may fail unintentionally.\n* If set to `false`, it will promote to the user specified by Ansible, e.g. `ansible_become_user`. This should generally work fine, but is less strict than with `true`.\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n```yaml\n- hosts: argocd_server\n  roles:\n    - ktooi.argocd_backup\n```\n\n## Authors\n\n* **Kodai Tooi** [GitHub](https://github.com/ktooi), [Qiita](https://qiita.com/ktooi)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktooi%2Fansible-role-argocd-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktooi%2Fansible-role-argocd-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktooi%2Fansible-role-argocd-backup/lists"}