{"id":22248906,"url":"https://github.com/purplebooth/utility-container-restic","last_synced_at":"2025-03-25T11:44:25.684Z","repository":{"id":199492441,"uuid":"703006562","full_name":"PurpleBooth/utility-container-restic","owner":"PurpleBooth","description":"The container and utility scripts I use for my backups","archived":false,"fork":false,"pushed_at":"2025-03-15T07:44:25.000Z","size":210,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T08:22:59.687Z","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PurpleBooth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-10-10T12:22:54.000Z","updated_at":"2025-03-15T07:44:28.000Z","dependencies_parsed_at":"2023-10-10T14:57:08.341Z","dependency_job_id":"bed99c25-ae36-401e-8325-82192dc72fa1","html_url":"https://github.com/PurpleBooth/utility-container-restic","commit_stats":null,"previous_names":["purplebooth/utility-container-restic"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Futility-container-restic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Futility-container-restic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Futility-container-restic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Futility-container-restic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PurpleBooth","download_url":"https://codeload.github.com/PurpleBooth/utility-container-restic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245458181,"owners_count":20618693,"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-12-03T06:19:57.041Z","updated_at":"2025-03-25T11:44:25.664Z","avatar_url":"https://github.com/PurpleBooth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# utility-container-restic\n\nA container I use for my backups. Has both [restic](https://github.com/restic/restic) and [rustic](https://github.com/rustic-rs/rustic/) in it. Uses rustic for the scripts.\n\n## Usage\n\nIn you init containers\n\n```yaml\n            - name: restore-data\n              image: ghcr.io/purplebooth/utility-container-restic:latest\n              imagePullPolicy: Always\n              securityContext:\n                runAsUser: 1568\n                runAsGroup: 1568\n              volumeMounts:\n                - mountPath: /restic-secret\n                  name: restic-secret\n                - mountPath: /data\n                  name: data\n                - mountPath: /cache\n                  name: restic-cache\n              envFrom:\n                - secretRef:\n                    name: restic-secret\n              command:\n                - restic-restore\n                - --host\n                - some-name-that-is-unique-to-this-app-but-not-to-the-instance\n                - --repository-file\n                - /restic-secret/repository\n                - --password-file\n                - /restic-secret/password\n                - --cache-dir\n                - /cache\n                - /some/folder/to/backup\n```\n\nIf the restore finds a folder without files, it'll try and run a rustic restore, or alternatively if it finds a file at the root of the mount called `restore-to` containing the hash you would like restored.\n\nFor a cronjob put this after the restore in the init, for a deployment put this along side the main container you are running\n\n```yaml\n          - name: backup\n            image: ghcr.io/purplebooth/utility-container-restic:latest\n            imagePullPolicy: Always\n            securityContext:\n              runAsUser: 1568\n              runAsGroup: 1568\n            volumeMounts:\n              - mountPath: /restic-secret\n                name: restic-secret\n              - mountPath: /data\n                name: data\n              - mountPath: /cache\n                name: restic-cache\n            envFrom:\n              - secretRef:\n                  name: restic-secret\n            command:\n              - restic-backup\n              - --host\n              - some-name-that-is-unique-to-this-app-but-not-to-the-instance\n              - --repository-file\n              - /restic-secret/repository\n              - --password-file\n              - /restic-secret/password\n              - --cache-dir\n              - /cache\n              - --sleep-for # Omit this to only run once\n              - \"3600\" # Omit this to only run once (sleep duration in seconds)\n              - /some/folder/to/backup\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplebooth%2Futility-container-restic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurplebooth%2Futility-container-restic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplebooth%2Futility-container-restic/lists"}