{"id":14994562,"url":"https://github.com/voxpupuli/puppet-borg","last_synced_at":"2025-12-11T21:38:01.170Z","repository":{"id":34936358,"uuid":"146160722","full_name":"voxpupuli/puppet-borg","owner":"voxpupuli","description":"Puppet module to deploy borgbackup with helpful CLI wrappers for backup \u0026 restore","archived":false,"fork":false,"pushed_at":"2025-10-17T14:45:41.000Z","size":506,"stargazers_count":4,"open_issues_count":8,"forks_count":9,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-10-20T21:35:04.561Z","etag":null,"topics":["archlinux-puppet-module","centos-puppet-module","debian-puppet-module","gentoo-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/borg","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2018-08-26T07:32:44.000Z","updated_at":"2025-09-27T13:19:20.000Z","dependencies_parsed_at":"2023-02-15T11:46:38.273Z","dependency_job_id":"8dfc481d-c2f1-4c21-92c3-a4eb01a6945b","html_url":"https://github.com/voxpupuli/puppet-borg","commit_stats":{"total_commits":264,"total_committers":12,"mean_commits":22.0,"dds":0.125,"last_synced_commit":"02907a14457776f17d2b6cdbd3e76ebe7ce8fcf6"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/puppet-borg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-borg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-borg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-borg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-borg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-borg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-borg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27670520,"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-12-11T02:00:11.302Z","response_time":56,"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":["archlinux-puppet-module","centos-puppet-module","debian-puppet-module","gentoo-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"created_at":"2024-09-24T16:03:53.174Z","updated_at":"2025-12-11T21:38:01.124Z","avatar_url":"https://github.com/voxpupuli.png","language":"Puppet","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# puppet-borg\n\n[![Build Status](https://github.com/voxpupuli/puppet-borg/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-borg/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-borg/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-borg/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/borg.svg)](https://forge.puppetlabs.com/puppet/borg)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/borg.svg)](https://forge.puppetlabs.com/puppet/borg)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/borg.svg)](https://forge.puppetlabs.com/puppet/borg)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/borg.svg)](https://forge.puppetlabs.com/puppet/borg)\n[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-borg)\n[![AGPL v3 License](https://img.shields.io/github/license/voxpupuli/puppet-borg.svg)](LICENSE)\n\n## Table of contents\n\n* [Borg Setup](#borg-setup)\n  * [Examples](#examples)\n* [Restore Script](#restore-script)\n* [Prometheus Exporter](#prometheus-exporter)\n* [Facts](#facts)\n* [Limitations](#limitations)\n* [Tests](#tests)\n* [Contributions](#contributions)\n* [License and Author](#license-and-author)\n\n## Borg Setup\n\n[Borg](https://borgbackup.readthedocs.io/en/stable/) is a client that creates\nlocal backups, encrypts them, and saves them at a given location. A possible\nlocation is the local filesystem, a mount of a remote storage (like CIFS),\ncertain storage protocols it directly can interact with or another borg binary.\nThe latter is the preferred option. You can place the borg binary on a remote\nlinux system and create an ssh account that cannot allocate a PTY and has\n`ForceCommand` set to `borg serve`. Such u user can only send and receive\nbackups to the binary via ssh. A possible configuration for the sshd server\nlooks like this (won't be handled by this module):\n\n```\n# /etc/ssh/sshd_config\nAcceptEnv LANG LC_*\nChallengeResponseAuthentication no\nPasswordAuthentication no\nPrintMotd no\nSubsystem sftp /usr/libexec/sftp-server\nUsePAM yes\nX11Forwarding yes\nMatch Group borgusers\n    AllowAgentForwarding no\n    AllowTcpForwarding no\n    AuthorizedKeysFile %h/%u/.ssh/authorized_keys\n    ForceCommand borg serve\n    PasswordAuthentication no\n    PermitTTY no\n    PermitUserRC no\n    X11Forwarding no\n```\n\nThis module will provide a borg backup script that works with such a setup. We\nwill also configure a systemd service and a timer to execute it on a regular\nbasis. Borg doesn't automatically prune old backups, our script has parameters\nfor this.\n\nPlease have a look at our [REFERENCE.md](https://github.com/voxpupuli/puppet-borg/blob/master/REFERENCE.md). All parameters are\ndocumented in that file.\n\n### Examples\n\nThe only parameter you really need to set is FQDN of the remote server:\n\n```puppet\nclass{'borg':\n  backupserver =\u003e 'myawesomebackupmachine.org'\n}\n```\n\nWe assume that your ssh username is the hostname from the client. You maybe\nwant to overwrite this assumption:\n\n```puppet\nclass{'borg':\n  backupserver =\u003e 'myawesomebackupmachine.org',\n  username =\u003e 'notmyhostname',\n}\n```\n\nWe need to tell the script what we want to do with every mountpoint, backup it\nor ignore it. We can also exclude specific paths. The defaults are stored in\nthe [manifests/init.pp](https://github.com/voxpupuli/puppet-borg/blob/master/manifests/init.pp)\nwith os-specific overrides in [data/](https://github.com/voxpupuli/puppet-borg/blob/master/data/).\n\n## Restore Script\n\nFiguring out from which backup archive you want to restore a certain file can\nbe quite time-consuming with just borg alone. When listing the contents of each\nbackup archive, the client will talk to the remote server a lot during the\ngeneration of the list. To speed this up, Florian Pritz developed a helper. This\nwill be executed after every backup. The script talks to the server and fetches\na list of all files from the last backup. The information are stored in a local\nsqlite database. You can do restores directly via this script. You can find the\nupstream documentation (including examples) at [metacpan.org](https://metacpan.org/pod/distribution/App-BorgRestore/script/borg-restore.pl)\n\n## Prometheus Exporter\n\nMore and more people use prometheus. We vendor a bash script that can provide\nyou metrics about your backups in the prometheus format. They are written to\ndisk and the node\\_exporter can collect them.\n\n## Facts\n\nThis module provides you a structed fact, named `borgbackup`. It currently only\nlists the borgbackup version. It's a structured so it can easily be extended\nwithout breaking changes and without further topscope pollution.\n\n```\n# puppet facts show borgbackup\n{\n  \"borgbackup\": {\n    \"version\": \"1.2.1\"\n  }\n}\n```\n\n## Limitations\n\nOn CentOS 8, the PowerTools repository needs to be enabled by the user.\nPackages from EPEL8 require the repository but it's disabled by default. For\nmore information see:\n* [CentOS 8 bug report about borgbackup](https://bugzilla.redhat.com/show_bug.cgi?id=1993287)\n* [EPEL8 setup guidelines](https://fedoraproject.org/wiki/EPEL#Quickstart)\n\nborgbackup before 1.1.17 didn't depend on packages from PowerTools so this\nworked by accident.\n\n## Tests\n\nThis module has several unit tests and linters configured. You can execute them\nby running:\n\n```sh\nbundle exec rake test\n```\n\nDetailed instructions are in the [CONTRIBUTING.md](https://github.com/voxpupuli/puppet-borg/blob/master/.github/CONTRIBUTING.md)\nfile.\n\n## Contributions\n\nContribution is fairly easy:\n\n* Fork the module into your namespace\n* Create a new branch\n* Commit your bugfix or enhancement\n* Write a test for it (maybe start with the test first)\n* Create a pull request\n\nDetailed instructions are in the [CONTRIBUTING.md](https://github.com/voxpupuli/puppet-borg/blob/master/.github/CONTRIBUTING.md)\nfile.\n\n## License and Author\n\nThis module was originally written by [Tim Meusel](https://github.com/bastelfreak).\nIt's licensed with [AGPL version 3](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-borg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-borg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-borg/lists"}