{"id":15854048,"url":"https://github.com/jeffwidman/ansible-tarsnap","last_synced_at":"2025-08-07T16:17:31.324Z","repository":{"id":86810139,"uuid":"43180886","full_name":"jeffwidman/ansible-tarsnap","owner":"jeffwidman","description":"Ansible role for installing Tarsnap on RHEL/CentOS","archived":false,"fork":false,"pushed_at":"2015-09-28T20:51:56.000Z","size":132,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T12:27:47.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jeffwidman.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":"2015-09-25T23:51:01.000Z","updated_at":"2016-09-27T11:48:36.000Z","dependencies_parsed_at":"2023-03-05T20:00:49.241Z","dependency_job_id":null,"html_url":"https://github.com/jeffwidman/ansible-tarsnap","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/jeffwidman%2Fansible-tarsnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwidman%2Fansible-tarsnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwidman%2Fansible-tarsnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwidman%2Fansible-tarsnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffwidman","download_url":"https://codeload.github.com/jeffwidman/ansible-tarsnap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246695561,"owners_count":20819295,"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-05T19:40:39.573Z","updated_at":"2025-04-01T18:50:14.490Z","avatar_url":"https://github.com/jeffwidman.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tarsnap Ansible role\n=========\n\nInstalls and manages `tarsnap` + `tarsnapper` on CentOS/RHEL 7.\n\nTarsnapper is a python wrapper for maintaining a GFS backup system.\n\nAlso includes logrotate policy.\n\nRole Variables\n--------------\n\nThe main variable you need to adjust is `tarsnapper_jobs_sourcefile`. This is the\nTarsnapper jobs file, where you specify what you want Tarsnapper to backup.\n\nBy default, `tarsnapper_jobs_sourcefile` looks for a file called\n`tarsnapper_jobs.yml.j2`. I have included an example in the templates directory\ncalled `tarsnapper_jobs.yml.j2.example`.\n\nThe simplest thing to do is copy this file to your playbook directory, add your\njobs, and then delete the '.example' extension.\n\nOne gotcha: Ansible first looks for files in the role's template directory and\nonly if it doesn't find the file will it look in the playbook directory. So if\n`tarsnapper_jobs.yml.j2` exists in both `/roles/tarsnap/templates` and in the root\nof your playbook directory, the role template will win.\n\nThere's a crontask that by default runs once a day to call Tarsnapper. If you want\nbackups more/less frequently, adjust the crontask accordingly.\nIf you want to be emailed the output of the job, just set `MAILTO` in your crontab.\n\nOther Notes\n--------------\n\nThis role is a little convoluted because there's a cron task that calls a bash\nshell script that runs tarsnapper which runs tarsnap.\n\nWhy a shell script?\nAdds some error handling and logs the output of the tarsnapper jobs to the logfile.\n\nWhy Tarsnapper?\nHaving lots of snapshots doesn't take up much additional space or cost because\ntarsnap does an amazing job of diff'ing the backups and only storing the deltas.\nUnfortunately, as you accumulate more and more snapshots, restoring a backup\nbecomes painfully slow because Tarsnap has to parse all those diffs to reconstruct\nthe backup.\nFor most production scenarios, a faster recovery time is more important than\nmaintaining daily backups for years and years. That's where Tarsnapper comes in.\nIt speeds up your recovery time by deleting intermediate backups, thereby\nforcing Tarsnap to merge snapshot deltas together. You can choose which snapshots\nget deleted using a configurable grandfather-father-son (GFS) scheme.\n\n\nRequirements\n------------\n\nTested on CentOS 7.\nUntested but will likely work on CentOS 6 and equivalent RHEL versions.\n\nExample Playbook\n----------------\n\n    - hosts: servers\n      roles:\n        - { role: tarsnap, tarsnapper_jobs_sourcefile: path/to/jobs/file, tags: ['tarsnap'] }\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\nJeff Widman jeff@jeffwidman.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffwidman%2Fansible-tarsnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffwidman%2Fansible-tarsnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffwidman%2Fansible-tarsnap/lists"}