{"id":15655654,"url":"https://github.com/etienne-napoleone/goutte","last_synced_at":"2025-05-05T14:42:38.401Z","repository":{"id":54877522,"uuid":"161600740","full_name":"etienne-napoleone/goutte","owner":"etienne-napoleone","description":"💧 DigitalOcean snapshot automation","archived":false,"fork":false,"pushed_at":"2024-04-11T23:31:13.000Z","size":161,"stargazers_count":24,"open_issues_count":4,"forks_count":1,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-04-11T10:17:25.672Z","etag":null,"topics":["automation","backup","digitalocean","droplets","snapshot","volumes"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etienne-napoleone.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":"2018-12-13T07:31:26.000Z","updated_at":"2022-12-06T22:05:59.000Z","dependencies_parsed_at":"2024-10-23T04:59:03.503Z","dependency_job_id":null,"html_url":"https://github.com/etienne-napoleone/goutte","commit_stats":{"total_commits":81,"total_committers":2,"mean_commits":40.5,"dds":"0.012345679012345734","last_synced_commit":"521fe211a3fd61ed3ba5beace8a174e8461d5b2a"},"previous_names":["tomochain/goutte"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etienne-napoleone%2Fgoutte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etienne-napoleone%2Fgoutte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etienne-napoleone%2Fgoutte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etienne-napoleone%2Fgoutte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etienne-napoleone","download_url":"https://codeload.github.com/etienne-napoleone/goutte/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252516226,"owners_count":21760745,"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":["automation","backup","digitalocean","droplets","snapshot","volumes"],"created_at":"2024-10-03T13:00:14.402Z","updated_at":"2025-05-05T14:42:38.377Z","avatar_url":"https://github.com/etienne-napoleone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goutte \u003ca href=\"https://travis-ci.org/tomochain/goutte\"\u003e\u003cimg align=\"right\" src=\"https://travis-ci.org/tomochain/goutte.svg?branch=develop\"\u003e\u003c/a\u003e\nDigitalOcean doesn't propose any way of automating snapshots.\nThere are [some SaaS](https://snapshooter.io/) that can take care of it but paying to execute some API requests seemed a bit off.\n\nThat's why we developed a simple script which can run with cron jobs or in CI services like Travis for free.\nWe use it daily to manage [our backups](https://github.com/tomochain/backups).\n\nIt includes:\n- Snapshoting droplets\n- Snapshoting volumes\n- Retention policy\n- Pruning snapshots\n\n## Requirements\n- Python ^3.6\n- A DigitalOcean account\n\n## Installation\nInstall it directly from pip:\n```bash\npip3 install --user goutte\n```\n\n## Configuration file\nGoutte takes its configuration from a pretty straightforward toml file.\nWe provided and example in `goutte.example.toml`.\n\n```toml\nretention = 10     # Number of backups to keep per droplet/volume\n\n[droplets]\nnames = [          # Array of droplets you want to snapshot\n  'server01',\n  'server02',\n  'server03',\n]\n\n[volumes]\nnames = [          # Array of volumes you want to snapshot\n  'db01',\n  'redis01',\n  'redis02',\n]\n```\n\n## Usage\nGoutte takes two arguments which can also be set via environment variables:\n\n| # | Help     | Description                         | Environment variable |\n| - | -------- | ----------------------------------- | -------------------- |\n| 1 | CONFIG   | Path to the toml configuration file | `GOUTTE_CONFIG`      |\n| 2 | DO_TOKEN | Your DigitalOcean API token         | `GOUTTE_DO_TOKEN`    |\n\n```bash\nUsage: goutte [OPTIONS] CONFIG DO_TOKEN\n\n  DigitalOcean snapshots automation.\n\nOptions:\n  --only [snapshot|prune]  Only snapshot or only prune\n  --debug                  Enable debug logging\n  --version                Show the version and exit.\n  --help                   Show this message and exit.\n```\n\nRunning \"snapshot only\" for a configuration file containing one droplet and one volume:\n```bash\n$ goutte goutte.toml $do_token --only snapshot\n13:32:48 - INFO - Starting goutte v1.0.1\n13:32:52 - INFO - sgp1-website-01 - Snapshot (goutte-sgp1-website-01-20181220-56bde)\n13:32:59 - INFO - sgp1-mariadb-01 - Snapshot (goutte-sgp1-mariadb-01-20181220-3673d)\n```\n\n## Run with Docker\nWe have a Docker image ready for you to use on Docker Hub.\nIt will read by default the configuration under `/goutte/goutte.toml`\n\n```bash\ndocker run \\\n  -e GOUTTE_DO_TOKEN=${do_token} \\\n  -v $(pwd)/goutte.toml:/goutte/goutte.toml \\\n  tomochain/goutte\n```\n\n## Automating with Travis\nYou can easily automate it via cron job but the easiest way would be by leveraging free CI tools like Travis.\n\n1. You can create a repo which contains your `goutte.toml` configuration and the following travis file `.travis.yml` :\n\n```yml\nlanguage: python\npython: 3.6\n\ninstall:\n  - pip install goutte\n\nscript:\n  - goutte goutte.toml # Don't forget to set GOUTTE_DO_TOKEN in Travis config\n```\n\n2. Enable the repo in Travis and then go to the configuration\n3. Add the environment variable GOUTTE_DO_TOKEN with the value of your DigitalOcean API key\n4. Enable daily cron job\n5. You're good to go, goutte will run everyday and take care of the snapshots.\n\n**Note**: You can have different retentions for different volumes by having multiple configurations.\n```yml\n# ...\nscript:\n  - goutte 10days.toml\n  - goutte 1day.toml\n```\n\nYou can see how we set it up for ourself [here](https://github.com/tomochain/backups).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetienne-napoleone%2Fgoutte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetienne-napoleone%2Fgoutte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetienne-napoleone%2Fgoutte/lists"}