{"action":"opened","issue":{"url":"https://api.github.com/repos/ArthurHlt/test-mirroring/issues/35","repository_url":"https://api.github.com/repos/ArthurHlt/test-mirroring","labels_url":"https://api.github.com/repos/ArthurHlt/test-mirroring/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/ArthurHlt/test-mirroring/issues/35/comments","events_url":"https://api.github.com/repos/ArthurHlt/test-mirroring/issues/35/events","html_url":"https://github.com/ArthurHlt/test-mirroring/issues/35","id":165840772,"number":35,"title":"Scheduled backup with retention period/quota, Story Id: 111952043","user":{"login":"ArthurHlt","id":5410858,"avatar_url":"https://avatars.githubusercontent.com/u/5410858?v=3","gravatar_id":"","url":"https://api.github.com/users/ArthurHlt","html_url":"https://github.com/ArthurHlt","followers_url":"https://api.github.com/users/ArthurHlt/followers","following_url":"https://api.github.com/users/ArthurHlt/following{/other_user}","gists_url":"https://api.github.com/users/ArthurHlt/gists{/gist_id}","starred_url":"https://api.github.com/users/ArthurHlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArthurHlt/subscriptions","organizations_url":"https://api.github.com/users/ArthurHlt/orgs","repos_url":"https://api.github.com/users/ArthurHlt/repos","events_url":"https://api.github.com/users/ArthurHlt/events{/privacy}","received_events_url":"https://api.github.com/users/ArthurHlt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ArthurHlt/test-mirroring/labels/feature","name":"feature","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-15T17:41:58Z","updated_at":"2016-07-15T17:41:58Z","closed_at":null,"body":"- **Link**: https://www.pivotaltracker.com/story/show/111952043\n- **Labels**: service-db-dumper\n- **Requester**: Guillaume Berche\n- **Estimate**: 3.0\n\nAs an user, in order to be protected against accidental data deletion, I need to configure scheduled backups, that don't pollute too much my space (service instance namespace)\n\nquotas exposed as service plans:\n- 3GB, 10GB\n\nPeriodicity expressed as cron expression: https://en.wikipedia.org/wiki/Cron#Configuration_file\n\nExample \n```sh\n#create a dump\ncf cs db-dumper-service 3GB service-name -c '{\"src...':'...', 'period':'1 0 * * *'}'\n```\nWhen the quota is reached, older dumps are deleted until there are sufficient space to hold the new dump.\n\nTo limit against a suddently very large dump that would erase all dump history (e.g. regression in an application that would have filled the db), by default, a maximum number of 2N dumps will be deleted (N=2 by default).\n\n\n```sh\n#restore a dump by date\ncf update-service test -c '{\"action\": \"restore\", \"target_url\": \"mysql://user:password@nameorip.of.your.second.db:port/database-second-name\", \"dump-date\":\"<date>\"}'\n```\n\nwould restore the 1st dump created after the selected date.\n\nhandling of reached quota: \n* configureable max nb of dumps to remove: 2 by default\n* predict reached quota\n* email notification (use CF notification service)\n* deleted dumps are included into the quota.\n* add \"forced delete\" option which synchronously deletes a dump\n* add a \"purge soft-deleted dumps\" option\n\nerror/failed dump handling: email notification (use CF notification service) of failed dumps\n"}}
{"actor":{"display_login":"ArthurHlt"}}