{"id":18096164,"url":"https://github.com/bbilly1/docker-maintain","last_synced_at":"2026-06-23T03:32:24.885Z","repository":{"id":131864464,"uuid":"578874753","full_name":"bbilly1/docker-maintain","owner":"bbilly1","description":"Collection of maintenance scripts for my docker VPS servers","archived":false,"fork":false,"pushed_at":"2025-01-25T08:58:52.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-10T00:21:05.276Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbilly1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-16T04:50:56.000Z","updated_at":"2025-09-17T06:16:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"6215d84f-a906-438b-a217-dbb250aa38f0","html_url":"https://github.com/bbilly1/docker-maintain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbilly1/docker-maintain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fdocker-maintain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fdocker-maintain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fdocker-maintain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fdocker-maintain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbilly1","download_url":"https://codeload.github.com/bbilly1/docker-maintain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fdocker-maintain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34674702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":[],"created_at":"2024-10-31T19:12:52.766Z","updated_at":"2026-06-23T03:32:24.866Z","avatar_url":"https://github.com/bbilly1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Maintain\nCollection of maintenance scripts for my docker VPS servers.\n\n## Core functionality\n- Easy volume snapshots for Docker container.\n- Dump *mariadb* and *postgres* databases to sql files.\n- Pack it all up into a compressed tar.gz file for further archiving.\n- Optionally sync the archive file to a S3 bucket\n- Optionally rotate backup files\n\n## Command line arguments\n- **update**: Update all containers\n- **snapshot**: Create snapshot of volumes and database containers\n- **restore**: Restore a local or S3 backup file\n\n## Config\nYou can configure the behaviour by creating a `.env` file in the root of this project. Take a look at the `.sample.env` file for an overview. Supported variables:\n\n- `AWS_ACCESS_KEY_ID`: Optional, for S3 backup\n- `AWS_SECRET_ACCESS_KEY`: Optional, for S3 backup\n- `BUCKET_NAME`: Optional, for S3 backup\n- `ENDPOINT_URL`: Optional, for S3 backup\n- `ROTATE_S3`: Optional, when using S3 backup, configure how many backup objects to keep\n- `ROTATE_LOCAL`: Optional, configure how many local tar.gz backup files to keep\n  - Outdated backups are trashed with `trash-cli`, you'll have to empty the trash yourself.\n\n## Run\nUse sudo from your regular user, not as root, e.g.:\n```bash\nsudo python maintain.py snapshot\nsudo python maintain.py update\n```\n\n## Expected folder structure\nThis script expect the following folder structure:\n```\n$HOME/docker                        \u003c-- base folder\n$HOME/docker/docker-compose.yml     \u003c-- your docker compose file\n$HOME/docker/\u003cany volume folder\u003e    \u003c-- all volume mount folder\n$HOME/backup                        \u003c-- backup base folder\n```\n\nIdeal companion to the **Docker Ubuntu** playbook from my [Ansible Playbooks](https://github.com/bbilly1/ansible-playbooks) collection.\n\n## Dev Setup\n\nInstall dev requirements into virtual environment and setup pre-commit:\n\n```\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements-dev.txt\npre-commit install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbilly1%2Fdocker-maintain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbilly1%2Fdocker-maintain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbilly1%2Fdocker-maintain/lists"}