{"id":15730071,"url":"https://github.com/bcoca/local_backup","last_synced_at":"2025-07-04T12:32:02.277Z","repository":{"id":150313204,"uuid":"362542790","full_name":"bcoca/local_backup","owner":"bcoca","description":"role that allows copying/moving remote backup_file to controller dir by config","archived":false,"fork":false,"pushed_at":"2022-11-02T14:43:06.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"devel","last_synced_at":"2025-03-12T15:15:52.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcoca.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":"2021-04-28T16:47:46.000Z","updated_at":"2023-03-21T15:39:11.000Z","dependencies_parsed_at":"2023-07-29T11:16:50.512Z","dependency_job_id":null,"html_url":"https://github.com/bcoca/local_backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bcoca/local_backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoca%2Flocal_backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoca%2Flocal_backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoca%2Flocal_backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoca%2Flocal_backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcoca","download_url":"https://codeload.github.com/bcoca/local_backup/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoca%2Flocal_backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263540773,"owners_count":23477454,"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":[],"created_at":"2024-10-03T23:41:45.989Z","updated_at":"2025-07-04T12:32:02.255Z","avatar_url":"https://github.com/bcoca.png","language":"Python","readme":"# local_backup\nrole that allows copying/moving remote backup_file to controller dir by config\n\nTo use just import the role and aftewards just use copy and other modules as normal.\nIf the `ANSIBLE_LOCAL_BACKUP` is set it will copy backup_file into that directory.\nIf the `ANSIBLE_REMOTE_BACKUP_CLEANUP` is also set it will remove the bakcup from the remote once copied.\n\n```\n- hosts: localhost\n  gather_facts: false\n  roles:\n    - local_backup\n  tasks:\n    - copy: backup=yes src=testing2 dest=testing1\n\n```\n\nIf running multiple plays you really only need to load once\n```\n- hosts: localhost\n  gather_facts: false\n  environment:\n\tANSIBLE_LOCAL_BACKUP: /var/tmp/backups/\n  roles:\n    - local_backup\n\n- hosts: yolo\n  tasks:\n    - copy: backup=yes src=testing2 dest=testing1\n      environment:\n\t    ANSIBLE_LOCAL_BACKUP: /backupdir/\n```\n\nBut if running against the controller, you need to set the envionrment vars before calling Ansible\n```\nANSIBLE_LOCAL_BACKUP=/backups/ ansible-playbook ...\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoca%2Flocal_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcoca%2Flocal_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoca%2Flocal_backup/lists"}