{"action":"created","comment":{"url":"https://api.github.com/repos/vimc/montagu-db/pulls/comments/184093367","pull_request_review_id":115217511,"id":184093367,"diff_hunk":"@@ -91,7 +85,13 @@ To dump out the latest copy of the database to recover from:\n \n You will then need to clone the contents of the `barman_recover` volume into a suitable place for the Postgres server to read from.\n \n-To remove all traces of barman (the cron job, the container and the volumes), use:\n+There is a nightly recovery - you can trigger this at other times by running","path":"backup/README.md","position":39,"original_position":39,"commit_id":"152f9efc67a699eaa4a0dafcaa5adc3185aa509d","original_commit_id":"152f9efc67a699eaa4a0dafcaa5adc3185aa509d","user":{"login":"MartinEden","id":1148055,"avatar_url":"https://avatars3.githubusercontent.com/u/1148055?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinEden","html_url":"https://github.com/MartinEden","followers_url":"https://api.github.com/users/MartinEden/followers","following_url":"https://api.github.com/users/MartinEden/following{/other_user}","gists_url":"https://api.github.com/users/MartinEden/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinEden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinEden/subscriptions","organizations_url":"https://api.github.com/users/MartinEden/orgs","repos_url":"https://api.github.com/users/MartinEden/repos","events_url":"https://api.github.com/users/MartinEden/events{/privacy}","received_events_url":"https://api.github.com/users/MartinEden/received_events","type":"User","site_admin":false},"body":"This line won't mean much to anyone who hasn't already grokked the system. Perhaps: \"Every night a snapshot of the database is written out to the `barman_nightly` volume. You can trigger this at other times...\"","created_at":"2018-04-25T15:00:46Z","updated_at":"2018-04-25T15:07:16Z","html_url":"https://github.com/vimc/montagu-db/pull/78#discussion_r184093367","pull_request_url":"https://api.github.com/repos/vimc/montagu-db/pulls/78","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/comments/184093367"},"html":{"href":"https://github.com/vimc/montagu-db/pull/78#discussion_r184093367"},"pull_request":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/vimc/montagu-db/pulls/78","id":184049237,"html_url":"https://github.com/vimc/montagu-db/pull/78","diff_url":"https://github.com/vimc/montagu-db/pull/78.diff","patch_url":"https://github.com/vimc/montagu-db/pull/78.patch","issue_url":"https://api.github.com/repos/vimc/montagu-db/issues/78","number":78,"state":"open","locked":false,"title":"I1710 - nightly backups in barman","user":{"login":"richfitz","id":1558093,"avatar_url":"https://avatars1.githubusercontent.com/u/1558093?v=4","gravatar_id":"","url":"https://api.github.com/users/richfitz","html_url":"https://github.com/richfitz","followers_url":"https://api.github.com/users/richfitz/followers","following_url":"https://api.github.com/users/richfitz/following{/other_user}","gists_url":"https://api.github.com/users/richfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/richfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richfitz/subscriptions","organizations_url":"https://api.github.com/users/richfitz/orgs","repos_url":"https://api.github.com/users/richfitz/repos","events_url":"https://api.github.com/users/richfitz/events{/privacy}","received_events_url":"https://api.github.com/users/richfitz/received_events","type":"User","site_admin":false},"body":"This does a few different things together to make this work:\r\n\r\n- the cron job is moved from the host machine to within the long-running container.  This simplifies deployment (and removal) but is a controversial decision (e.g. https://medium.com/@jonbaldie/how-to-run-cron-jobs-inside-docker-containers-26964315b582).  But now that we need two cron jobs I think this is better - and barman is weird enough anyway.\r\n- the container gets another volume `/nightly` which will be the volume that can be used to get a recent backup for staging machines via bb8/starport\r\n- there is a script `update-nightly` that tries to move into place the new backup as smoothly as possible.  The backup is done into a directory on the `/nightly` volume, then the previous restore is removed, then the new one is moved into place.  At the cost of twice the required storage this minimises the time we are exposed to an inconsistent filesystem.  The presence of the file `.barman-last-restore` indicates that the directory is good to use\r\n\r\nAfter setting up in test mode, you should be able to monitor `/var/log/barman.log` which will tick over every minute\r\n\r\nMerging #77 first will remove much of the noise from this PR","created_at":"2018-04-25T14:10:04Z","updated_at":"2018-04-25T15:07:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31dcf6774c54b4e7b481e7e99d77bf69c3b0c632","assignee":null,"assignees":[],"requested_reviewers":[{"login":"littledice","id":6736820,"avatar_url":"https://avatars3.githubusercontent.com/u/6736820?v=4","gravatar_id":"","url":"https://api.github.com/users/littledice","html_url":"https://github.com/littledice","followers_url":"https://api.github.com/users/littledice/followers","following_url":"https://api.github.com/users/littledice/following{/other_user}","gists_url":"https://api.github.com/users/littledice/gists{/gist_id}","starred_url":"https://api.github.com/users/littledice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littledice/subscriptions","organizations_url":"https://api.github.com/users/littledice/orgs","repos_url":"https://api.github.com/users/littledice/repos","events_url":"https://api.github.com/users/littledice/events{/privacy}","received_events_url":"https://api.github.com/users/littledice/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vimc/montagu-db/pulls/78/commits","review_comments_url":"https://api.github.com/repos/vimc/montagu-db/pulls/78/comments","review_comment_url":"https://api.github.com/repos/vimc/montagu-db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vimc/montagu-db/issues/78/comments","statuses_url":"https://api.github.com/repos/vimc/montagu-db/statuses/152f9efc67a699eaa4a0dafcaa5adc3185aa509d","head":{"label":"vimc:i1710","ref":"i1710","sha":"152f9efc67a699eaa4a0dafcaa5adc3185aa509d","user":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"repo":{"id":84579256,"name":"montagu-db","full_name":"vimc/montagu-db","owner":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vimc/montagu-db","description":null,"fork":false,"url":"https://api.github.com/repos/vimc/montagu-db","forks_url":"https://api.github.com/repos/vimc/montagu-db/forks","keys_url":"https://api.github.com/repos/vimc/montagu-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vimc/montagu-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vimc/montagu-db/teams","hooks_url":"https://api.github.com/repos/vimc/montagu-db/hooks","issue_events_url":"https://api.github.com/repos/vimc/montagu-db/issues/events{/number}","events_url":"https://api.github.com/repos/vimc/montagu-db/events","assignees_url":"https://api.github.com/repos/vimc/montagu-db/assignees{/user}","branches_url":"https://api.github.com/repos/vimc/montagu-db/branches{/branch}","tags_url":"https://api.github.com/repos/vimc/montagu-db/tags","blobs_url":"https://api.github.com/repos/vimc/montagu-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vimc/montagu-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vimc/montagu-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/vimc/montagu-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vimc/montagu-db/statuses/{sha}","languages_url":"https://api.github.com/repos/vimc/montagu-db/languages","stargazers_url":"https://api.github.com/repos/vimc/montagu-db/stargazers","contributors_url":"https://api.github.com/repos/vimc/montagu-db/contributors","subscribers_url":"https://api.github.com/repos/vimc/montagu-db/subscribers","subscription_url":"https://api.github.com/repos/vimc/montagu-db/subscription","commits_url":"https://api.github.com/repos/vimc/montagu-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/vimc/montagu-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/vimc/montagu-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/vimc/montagu-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/vimc/montagu-db/contents/{+path}","compare_url":"https://api.github.com/repos/vimc/montagu-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vimc/montagu-db/merges","archive_url":"https://api.github.com/repos/vimc/montagu-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vimc/montagu-db/downloads","issues_url":"https://api.github.com/repos/vimc/montagu-db/issues{/number}","pulls_url":"https://api.github.com/repos/vimc/montagu-db/pulls{/number}","milestones_url":"https://api.github.com/repos/vimc/montagu-db/milestones{/number}","notifications_url":"https://api.github.com/repos/vimc/montagu-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vimc/montagu-db/labels{/name}","releases_url":"https://api.github.com/repos/vimc/montagu-db/releases{/id}","deployments_url":"https://api.github.com/repos/vimc/montagu-db/deployments","created_at":"2017-03-10T16:29:25Z","updated_at":"2018-04-25T14:50:54Z","pushed_at":"2018-04-25T14:58:19Z","git_url":"git://github.com/vimc/montagu-db.git","ssh_url":"git@github.com:vimc/montagu-db.git","clone_url":"https://github.com/vimc/montagu-db.git","svn_url":"https://github.com/vimc/montagu-db","homepage":null,"size":443,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"vimc:master","ref":"master","sha":"63e09e0e08f26909c6a573e7e312af02432ee6fd","user":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"repo":{"id":84579256,"name":"montagu-db","full_name":"vimc/montagu-db","owner":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vimc/montagu-db","description":null,"fork":false,"url":"https://api.github.com/repos/vimc/montagu-db","forks_url":"https://api.github.com/repos/vimc/montagu-db/forks","keys_url":"https://api.github.com/repos/vimc/montagu-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vimc/montagu-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vimc/montagu-db/teams","hooks_url":"https://api.github.com/repos/vimc/montagu-db/hooks","issue_events_url":"https://api.github.com/repos/vimc/montagu-db/issues/events{/number}","events_url":"https://api.github.com/repos/vimc/montagu-db/events","assignees_url":"https://api.github.com/repos/vimc/montagu-db/assignees{/user}","branches_url":"https://api.github.com/repos/vimc/montagu-db/branches{/branch}","tags_url":"https://api.github.com/repos/vimc/montagu-db/tags","blobs_url":"https://api.github.com/repos/vimc/montagu-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vimc/montagu-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vimc/montagu-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/vimc/montagu-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vimc/montagu-db/statuses/{sha}","languages_url":"https://api.github.com/repos/vimc/montagu-db/languages","stargazers_url":"https://api.github.com/repos/vimc/montagu-db/stargazers","contributors_url":"https://api.github.com/repos/vimc/montagu-db/contributors","subscribers_url":"https://api.github.com/repos/vimc/montagu-db/subscribers","subscription_url":"https://api.github.com/repos/vimc/montagu-db/subscription","commits_url":"https://api.github.com/repos/vimc/montagu-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/vimc/montagu-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/vimc/montagu-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/vimc/montagu-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/vimc/montagu-db/contents/{+path}","compare_url":"https://api.github.com/repos/vimc/montagu-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vimc/montagu-db/merges","archive_url":"https://api.github.com/repos/vimc/montagu-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vimc/montagu-db/downloads","issues_url":"https://api.github.com/repos/vimc/montagu-db/issues{/number}","pulls_url":"https://api.github.com/repos/vimc/montagu-db/pulls{/number}","milestones_url":"https://api.github.com/repos/vimc/montagu-db/milestones{/number}","notifications_url":"https://api.github.com/repos/vimc/montagu-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vimc/montagu-db/labels{/name}","releases_url":"https://api.github.com/repos/vimc/montagu-db/releases{/id}","deployments_url":"https://api.github.com/repos/vimc/montagu-db/deployments","created_at":"2017-03-10T16:29:25Z","updated_at":"2018-04-25T14:50:54Z","pushed_at":"2018-04-25T14:58:19Z","git_url":"git://github.com/vimc/montagu-db.git","ssh_url":"git@github.com:vimc/montagu-db.git","clone_url":"https://github.com/vimc/montagu-db.git","svn_url":"https://github.com/vimc/montagu-db","homepage":null,"size":443,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/78"},"html":{"href":"https://github.com/vimc/montagu-db/pull/78"},"issue":{"href":"https://api.github.com/repos/vimc/montagu-db/issues/78"},"comments":{"href":"https://api.github.com/repos/vimc/montagu-db/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vimc/montagu-db/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/vimc/montagu-db/statuses/152f9efc67a699eaa4a0dafcaa5adc3185aa509d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"MartinEden"}}