{ "info": { "author": "etienne-napoleone", "author_email": "etienne@tomochain.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# goutte \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\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tomochain/goutte", "keywords": "digitalocean,do,snapshot,snapshots,backup", "license": "GPL-3.0+", "maintainer": "", "maintainer_email": "", "name": "goutte", "package_url": "https://pypi.org/project/goutte/", "platform": "", "project_url": "https://pypi.org/project/goutte/", "project_urls": { "Homepage": "https://github.com/tomochain/goutte", "Repository": "https://github.com/tomochain/goutte" }, "release_url": "https://pypi.org/project/goutte/1.0.1/", "requires_dist": [ "click (>=7.0,<8.0)", "colorlog (>=3.1,<4.0)", "python-digitalocean (>=1.14,<2.0)", "toml (>=0.10.0,<0.11.0)" ], "requires_python": ">=3.5,<4.0", "summary": "DigitalOcean snapshot automation service", "version": "1.0.1" }, "last_serial": 4658631, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "97ab8f9cf23e2b52ebdc3937e7c66417", "sha256": "a7941dd12e77dce98f2be14a487db88a78d21684c5730a6c7ba4bdb83c3a20f1" }, "downloads": -1, "filename": "goutte-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "97ab8f9cf23e2b52ebdc3937e7c66417", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 47950, "upload_time": "2018-12-20T09:55:26", "url": "https://files.pythonhosted.org/packages/59/20/7ca1c184e1f115d8b48b043b1350f23a506c52335faaff2fadf0695742f4/goutte-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfb9d31a74b5fde887ed913822084cd6", "sha256": "44dbd4bf52fa74bf8405a45f4cbf2f4dcd989afef18df448bc8aacf545a25e76" }, "downloads": -1, "filename": "goutte-1.0.0.tar.gz", "has_sig": false, "md5_digest": "cfb9d31a74b5fde887ed913822084cd6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 16862, "upload_time": "2018-12-20T09:55:28", "url": "https://files.pythonhosted.org/packages/73/d2/d5ef6058fc8dc1a7611daed6b304dfab556a6a9bdd1c6882d8a71a768b75/goutte-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "285562217a169dfb2b54ac97ba5540cc", "sha256": "8abeb3814df249cc1ea8ad0fa4a81d342d5bf25b3f115e4955b2814c7db5d15b" }, "downloads": -1, "filename": "goutte-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "285562217a169dfb2b54ac97ba5540cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 48692, "upload_time": "2019-01-04T03:17:27", "url": "https://files.pythonhosted.org/packages/bb/2d/e6e505a290bf6a8de03f5e9dfdd14ce8938b48ba6e51f65866b654c40147/goutte-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55ac7ea55643b31f010c5325af424cad", "sha256": "f4fe55df5dc4d9c0db1444a53415ee5fffc555df18c00246fcf0690c715353b7" }, "downloads": -1, "filename": "goutte-1.0.1.tar.gz", "has_sig": false, "md5_digest": "55ac7ea55643b31f010c5325af424cad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 17230, "upload_time": "2019-01-04T03:17:29", "url": "https://files.pythonhosted.org/packages/36/80/0a65cedaa2955f174254915e400ac4c05ed68530cbe7b39fab83fa19635c/goutte-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "285562217a169dfb2b54ac97ba5540cc", "sha256": "8abeb3814df249cc1ea8ad0fa4a81d342d5bf25b3f115e4955b2814c7db5d15b" }, "downloads": -1, "filename": "goutte-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "285562217a169dfb2b54ac97ba5540cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 48692, "upload_time": "2019-01-04T03:17:27", "url": "https://files.pythonhosted.org/packages/bb/2d/e6e505a290bf6a8de03f5e9dfdd14ce8938b48ba6e51f65866b654c40147/goutte-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55ac7ea55643b31f010c5325af424cad", "sha256": "f4fe55df5dc4d9c0db1444a53415ee5fffc555df18c00246fcf0690c715353b7" }, "downloads": -1, "filename": "goutte-1.0.1.tar.gz", "has_sig": false, "md5_digest": "55ac7ea55643b31f010c5325af424cad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 17230, "upload_time": "2019-01-04T03:17:29", "url": "https://files.pythonhosted.org/packages/36/80/0a65cedaa2955f174254915e400ac4c05ed68530cbe7b39fab83fa19635c/goutte-1.0.1.tar.gz" } ] }