{"id":22908895,"url":"https://github.com/ipunkt/docker-backup-restore","last_synced_at":"2025-04-01T09:59:16.302Z","repository":{"id":66084683,"uuid":"83800280","full_name":"ipunkt/docker-backup-restore","owner":"ipunkt","description":"Use an internal rancherize to restore a specific backup","archived":false,"fork":false,"pushed_at":"2017-12-07T14:00:55.000Z","size":580,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-07T05:27:43.060Z","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/ipunkt.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":"2017-03-03T13:21:56.000Z","updated_at":"2017-03-03T15:09:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9c3cd82-a2a3-4b58-8ac9-88c857203a63","html_url":"https://github.com/ipunkt/docker-backup-restore","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Fdocker-backup-restore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Fdocker-backup-restore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Fdocker-backup-restore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Fdocker-backup-restore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipunkt","download_url":"https://codeload.github.com/ipunkt/docker-backup-restore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620260,"owners_count":20806722,"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-14T03:33:01.792Z","updated_at":"2025-04-01T09:59:16.272Z","avatar_url":"https://github.com/ipunkt.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-backup-restore\nUse an internal rancherize to restore a specific backup\n\n# Usage\n## With ipunktbs/xtrabackup\nThis image is designed to be used in conjunction with ipunktbs/xtrabackup. Both\nto restore backups from ipunktbs/xtrabackup and in a comming mode where\nipunktbs/xtrabackup creates - but does not run - an instance of this image for\nevery taken backup.\n\n## Manually\nTo run the image manually set at least all environment variables listed below\nthat do not have a default value in a `docker run` command.\nAvailable commands:\n\n- run COMMAND: Run `command` in a shell withing the container. Ment for\n  debugging\n- list: show available backups\n- restore BACKUP\\_KEY: Restore the backup given as parameter\n\n```sh\n\tdocker run \\\n\t\t-e RANCHER\\_URL=http:\\\\/\\\\/example.com\\\\/v1\\\\/projects\\\\/1a1 \\\n\t\t-e RANCHER\\_KEY=XYZ \\\n\t\t-e RANCHER\\_SECRET=XYZ \\\n\t\t-e RANCHER\\_COMPOSE\\_VERSION=0.12.2 \\\n\t\t-e BACKUP\\_DRIVER=convoy \\\n\t\t-e BACKUP\\_VOLUME=backup \\\n\t\t-e STORAGEBOX\\_METHOD= \\\n\t\t-e STORAGEBOX\\_URL=sftp://u123456.your-storagebox.de/backup-directory/ \\\n\t\t-e STORAGEBOX\\_USER=u123456 \\\n\t\t-e STORAGEBOX\\_PASSWORD=xzy \\\n\t\tipunktbs/backup-restore:latest restore XXXX-XX-XX-XXXXX\n```\n\nSince there are a few environment variables to keep track of here I recommend\nwriting a docker-compose.yml to run it instead:\n\n```yaml\nbackupper:\n  image: ipunktbs/backup-restore:latest\n  environment:\n    - RANCHER_URL=http:\\\\/\\\\/example.com\\\\/v1\\\\/projects\\\\/1a5\n    - RANCHER_KEY=XYZ\n    - RANCHER_SECRET=XYZ\n    - RANCHER_COMPOSE_VERSION=0.12.2\n    - BACKUP_VOLUME=backup\n    - BACKUP_DRIVER=convoy\n    - STORAGEBOX_URL=sftp://u123456.your-storagebox.de/backup/\n    - STORAGEBOX_USER=u123456\n    - STORAGEBOX_PASSWORD=xzy\n  command: restore BACKUP_KEY\n  restart: \"no\"\n```\n\n\tdocker-compose up\n\n\n# Environment variables\n\n| environment variable | default value | description |\n| -------------------- | ------------- | ----------- |\n| RANCHER\\_URL | - | Rancher api url as seen in the environment api tab. |\nIMPORTANT: This is set using sed replacement and inserted into a json file. |\ndouble escape slashes -\u003e http:\\\\/\\\\/example.com\\\\/ |\n| RANCHER\\_KEY | - | Rancher api key to be used by rancher-compose and rancherize |\n| RANCHER\\_SECRET | - | Rancher api secret to be used by rancher-compose and rancherize  |\n| RANCHER\\_COMPOSE\\_VERSION | 0.12.2 | Rancherize version to use - will be downloaded if necessary |\n| BACKUP\\_VOLUME | - | Backup storagebox option - on which global volumes are the backups kept? |\n| BACKUP\\_DRIVER | - | Backup storagebox option - which storage-driver needs to be set so the BACKUP\\_VOLUME will access the backups|\n| BACKUP\\_PMA\\_URL | - | Backup storagebox option - which the url which pma should attempt to publish |\n| STORAGEBOX\\_METHOD | sftp | Backup storagebox option - method to access the storagebox to retrieve backup configuration |\n| STORAGEBOX\\_URL | - | Backup storagebox option - url to access the storagebox to retrieve backup configuration |\n| STORAGEBOX\\_USER | - | Backup storagebox option - user to access the storagebox to retrieve backup configuration |\n| STORAGEBOX\\_PASSWORD | - | Backup storagebox option - password to access the storagebox to retrieve backup configuration |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Fdocker-backup-restore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipunkt%2Fdocker-backup-restore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Fdocker-backup-restore/lists"}