{ "info": { "author": "Diego Parrilla", "author_email": "diego.parrilla.santamaria@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Topic :: System :: Archiving" ], "description": "Gcloud-Scheduled-Snapshots - A simple Google Cloud Compute Engine daily and weekly rotative scheduled snapshots\n===============================================================================================================\n\nVersion 0.0.6 Alpha\n\nIntroduction\n------------\n\nOne of the nice features of the Infrastructure as a service platforms is\nhow a DevOp can take a snapshot of an existing disk and create a new\nserver from it. In some cases the cost can be a few cents, a very\nreasonable price for this feature.\n\nAny DevOp can be tempted to use this snapshot feature as a cheap\nalternative to more traditional backup systems and procedure and\nschedule the snapshots of their disks in the cloud on a time basis.\nSadly, the Compute Engine of Google Cloud Platform currently does not\nsupport any time scheduling feature.\n\nSince this is a nice to have feature of the Google Compute Engine, there\nare several scripts out there that can help DevOps with this task, but I\nwanted to do something easy to use and most of all: fully unattended.\n\nSo if you want to have a scheduled snapshots in your Google Compute\nEngine projects with some interesting features like daily and weekly\nschedules, snapshots retention policies and programmable hour and minute\nof execution, please keep on reading!\n\nWhat you need\n-------------\n\nThis tool needs the following environment:\n\n- A Python 2.7 runtime.\n- A NIX operating system. It has been tested in Ubuntu 16.04 and Mac\n OSX, but it should work on any modern NIX.\n- CRON and CRONTAB installed and enabled in your operating system.\n- AT installed and enabled (Mac OSX users, please read this).\n- A server to server JSON credentials file downloaded from *API Manager\n / Credentials*.\n\nHow to install\n--------------\n\nUbuntu 16.04\n~~~~~~~~~~~~\n\nStep 1. Update and upgrade your system\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nMake sure you are using the latest packages and versions.\n\n::\n\n sudo apt-get update\n sudo apt-get upgrade\n\nStep 1. Install Python tools\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWe will use *pip* install utility to get the latest version of the tool.\n\n::\n\n sudo apt-get install python-pip\n\nStep 2. Install the gcloud-scheduled-snapshots tool\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nUse *pip* to download and install it. Root privileges not needed, a\nsimple user works.\n\n::\n\n pip install gcloud-scheduled-snapshots\n\nStep 3. Download the JSON credentials file\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWe need a JSON credentials file with permissions to manage snapshots and\ndisks. Please read\nhttps://developers.google.com/identity/protocols/application-default-credentials\n\nYou can download your credentials from\nhttps://console.developers.google.com/project/\\_/apis/credentials\n\nNow, save the file under\n/home/YOUR\\_USER/.local/YOUR\\_JSON\\_CREDENTIALS\\_FILE.json\n\nStep 4. Edit the gss.ini configuration file\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis configuration file has to be modified to enter the following\ninformation:\n\n- Rename *gss-sample.ini* file to *gss.ini* the first time you install.\n If you are upgrading, check if there are new parameters needed, but\n defaults should work.\n- Under *autentication/credentials* enter the full path to the JSON\n credentials file previously downloaded.\n- In *project/id* enter the ID of the project. The ID is the string\n that must be in lowercase, don\u2019t use the project NAME.\n- There is also parameters to reconfigure the traces and logs. By\n default, the logs are stored in /home/YOUR\\_USER/.local/logs\n\nStep 5. Add a new entry in the CRONTAB\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nEvery day at 00:00 the main process of the tool will schedule at what\ntime the snapshots must be execute. So we need to add the following line\nto your crontab.\n\nFirst open your crontab in edition mode:\n\n::\n\n crontab -e\n\nNow paste the following line:\n\n::\n\n 0 0 * * * $HOME/.local/bin/gcloud_schedule_snapshots --config $HOME/.local/etc/gss.ini\n\nSave the changes. The tool is installed and configured. Now it\u2019s time to\nprogram the snapshots needed.\n\nHow to program your automated snapshots\n---------------------------------------\n\nHow it works\n~~~~~~~~~~~~\n\nThe tool runs every day at 00:00. It scans all the existing snapshots,\nparsing their names looking for a specific pattern describing the\nfrecuency, the retention period and the time to launch the snapshot.\nWhen there is a match, the process creates a programmed task with the AT\ncommand.\n\nThe snapshot naming convention\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe tool tries to find the snapshot names following this convention:\n\n::\n\n ANY_SNAPSHOT_NAME-FRECUENCY-RETENTION_PERIOD-EXECUTION_TIME\n\n- ANY\\_SNAPSHOT\\_NAME: Any lowercase text can be used here to help to\n identify the snapshot.\n- FRECUENCY: There are two possible values: *schedule-daily* if the\n snapshot is executed daily or *schedule-weekly* if it\u2019s executed\n weekly.\n- RETENTION\\_PERIOD: The amount of days a snapshot will be kept. After\n RETENTION\\_PERIOD plus 1, the snapshot will be deleted. This value\n must be from 1 to 99 and must always have two digits.\n- EXECUTION\\_TIME: Hour and minute of snapshot execution and retention\n deletion (if any). The format is HHMM and must have two digits each.\n Four digits combined.\n\nExample 1:\n\n::\n\n mytest-schedule-daily-07-0600\n\nEvery day at 06:00 AM the disk in the original snapshot will be used to\ncreate a new snapshot. Also at 06:00 AM the 8th snapshot will be\ndeleted, if it exists.\n\nExample 2:\n\n::\n\n mytest-schedule-weekly-04-0800\n\nEvery week the same that the original snapshot was created at 08:00 AM\nthe disk in the original snapshot will be used to create a new snapshot.\nAlso at 08:00 AM the 5th snapshot will be deleted, if it exists.\n\nTroubleshooting\n---------------\n\nThe log files are stored in *$HOME/.local/logs*\n\nRevisions\n---------\n\nVersion 0.6 Alpha\n~~~~~~~~~~~~~~~~~\n\n- Fixed broken snapshot deletion\n\nVersion 0.5 Alpha\n~~~~~~~~~~~~~~~~~\n\n- Moved default log file to root.\n- Rename gss.ini to gss-smaple.ini to avoid the file to be overwritten when upgrading\n\nVersion 0.4 Alpha\n~~~~~~~~~~~~~~~~~\n\n- Fixed reStructuredText and Markdown compatibility.\n- Added 'executables' section to configuration file\n- Force full path in 'at' commands\n\nVersion 0.3 Alpha\n~~~~~~~~~~~~~~~~~\n\n- First public release. Use with caution.\n\nCollaborate\n-----------\n\nYou can consider this tool as a work in progress, so please feel free to\nsuggest and send pull requests if you want to.\n\nLegal\n-----\n\nThe software is provided \u2018as is\u2019. Use it at your own risk, and keep in\nmind that you are playing with your data. So test, test, test and test!\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moocherio/gcloud-scheduled-snapshots", "keywords": "google compute engine snapshots tool", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "gcloud-scheduled-snapshots", "package_url": "https://pypi.org/project/gcloud-scheduled-snapshots/", "platform": "", "project_url": "https://pypi.org/project/gcloud-scheduled-snapshots/", "project_urls": { "Homepage": "https://github.com/moocherio/gcloud-scheduled-snapshots" }, "release_url": "https://pypi.org/project/gcloud-scheduled-snapshots/0.0.6/", "requires_dist": [ "google-api-python-client", "oauth2client" ], "requires_python": "", "summary": "Google Compute Cloud scheduled snapshots tool", "version": "0.0.6" }, "last_serial": 2612325, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "258c6979b3315403507fc69985463fe6", "sha256": "b04e59dbb41384ea1066c61fcd5598da03c1e62401029c1d8e724f7a40094d50" }, "downloads": -1, "filename": "gcloud_scheduled_snapshots-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "258c6979b3315403507fc69985463fe6", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13144, "upload_time": "2017-01-26T19:37:40", "url": "https://files.pythonhosted.org/packages/46/99/8da95376665cf8d0bbdd7ce764c5190067d9e6e86444ed049db53d095f80/gcloud_scheduled_snapshots-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be259d65b90d9b1ff35ec27f8f177a8b", "sha256": "966c734c2a8e159509565d7cba339b5612c333887e2882cb0ed5e039a9767161" }, "downloads": -1, "filename": "gcloud-scheduled-snapshots-0.0.3.tar.gz", "has_sig": false, "md5_digest": "be259d65b90d9b1ff35ec27f8f177a8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8252, "upload_time": "2017-01-26T19:37:42", "url": "https://files.pythonhosted.org/packages/91/63/f20934b891624e00082eefe22565393371e3cfab9c51af9dd12c92372944/gcloud-scheduled-snapshots-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "31ae5a842e7b2fd04db48c73e2523d37", "sha256": "b70f60666cbdda674c7a8b22547ccbd58ceedea49b74f47f0c199f51bf701abc" }, "downloads": -1, "filename": "gcloud_scheduled_snapshots-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "31ae5a842e7b2fd04db48c73e2523d37", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14335, "upload_time": "2017-01-30T08:27:28", "url": "https://files.pythonhosted.org/packages/84/2f/373581ce4c74f54459affc9f74c5d7c65473e41103ade08eafba411bfc67/gcloud_scheduled_snapshots-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88ce38b998a983eb610c20cc9467bf99", "sha256": "f6e08baaa97b0f735855134d783af2ac8ea45e7e7c45f40ba1986ee3c75cadf8" }, "downloads": -1, "filename": "gcloud-scheduled-snapshots-0.0.4.tar.gz", "has_sig": false, "md5_digest": "88ce38b998a983eb610c20cc9467bf99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9155, "upload_time": "2017-01-30T08:27:29", "url": "https://files.pythonhosted.org/packages/aa/1b/02444c3ab2b943e594c1dc3a0ddc1423909930032ebb6af8020b3cbaa8f2/gcloud-scheduled-snapshots-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "d7965deb8680b96b26174b4806e34a5c", "sha256": "7134f394f600fadd6e57b6300b7cd15d1fcd18fffe95a6ce5288c3d22b83e295" }, "downloads": -1, "filename": "gcloud_scheduled_snapshots-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "d7965deb8680b96b26174b4806e34a5c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14600, "upload_time": "2017-01-30T14:05:27", "url": "https://files.pythonhosted.org/packages/dc/97/82958cca1ffb756425eca9b95d2d7321648b40f19e733a99db30ed10bd39/gcloud_scheduled_snapshots-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "05e7084615c9ee0a6118207ebefdde91", "sha256": "c3990c7ed2379b57d6a2b8827a5cfa3f1b5ac5c08722587369caebf79e9ab2e3" }, "downloads": -1, "filename": "gcloud-scheduled-snapshots-0.0.5.tar.gz", "has_sig": false, "md5_digest": "05e7084615c9ee0a6118207ebefdde91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9319, "upload_time": "2017-01-30T14:05:29", "url": "https://files.pythonhosted.org/packages/d0/94/d8ddfea1579d386b15536d77e94813f153dd828914f76dff685f3a8988ba/gcloud-scheduled-snapshots-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "88a784608fde9ca1b3021111301d461d", "sha256": "4043a85d57f5a8f81735c0340b7a2c51c95d8f237e49db78dae7e02cad3f114c" }, "downloads": -1, "filename": "gcloud_scheduled_snapshots-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "88a784608fde9ca1b3021111301d461d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14633, "upload_time": "2017-02-01T18:33:26", "url": "https://files.pythonhosted.org/packages/9a/44/d8d38d6382950590a896d4f6c1f38c8d3b173cf1160bbee34d012ee0b8fe/gcloud_scheduled_snapshots-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "653d8ce8b7bb3efade660735acad3c9a", "sha256": "6d1888344c6023ef2db70b015eb9da5671c8ac52dcb9cb81c7949a83f4d94048" }, "downloads": -1, "filename": "gcloud-scheduled-snapshots-0.0.6.tar.gz", "has_sig": false, "md5_digest": "653d8ce8b7bb3efade660735acad3c9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9365, "upload_time": "2017-02-01T18:33:28", "url": "https://files.pythonhosted.org/packages/cf/4d/6a0c397d2c2fe6dc24e4ee45aaa0ef34c806049ff763d6155015679182b3/gcloud-scheduled-snapshots-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88a784608fde9ca1b3021111301d461d", "sha256": "4043a85d57f5a8f81735c0340b7a2c51c95d8f237e49db78dae7e02cad3f114c" }, "downloads": -1, "filename": "gcloud_scheduled_snapshots-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "88a784608fde9ca1b3021111301d461d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14633, "upload_time": "2017-02-01T18:33:26", "url": "https://files.pythonhosted.org/packages/9a/44/d8d38d6382950590a896d4f6c1f38c8d3b173cf1160bbee34d012ee0b8fe/gcloud_scheduled_snapshots-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "653d8ce8b7bb3efade660735acad3c9a", "sha256": "6d1888344c6023ef2db70b015eb9da5671c8ac52dcb9cb81c7949a83f4d94048" }, "downloads": -1, "filename": "gcloud-scheduled-snapshots-0.0.6.tar.gz", "has_sig": false, "md5_digest": "653d8ce8b7bb3efade660735acad3c9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9365, "upload_time": "2017-02-01T18:33:28", "url": "https://files.pythonhosted.org/packages/cf/4d/6a0c397d2c2fe6dc24e4ee45aaa0ef34c806049ff763d6155015679182b3/gcloud-scheduled-snapshots-0.0.6.tar.gz" } ] }