{"action":"created","comment":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/comments/49028851","id":49028851,"diff_hunk":"@@ -0,0 +1,144 @@\n+.. include:: global.rst.inc\n+.. _deployment:\n+\n+Deployment\n+==========\n+\n+This chapter will give an example how to setup a borg storage server for multiple\n+clients.\n+\n+Machines\n+--------\n+\n+There are multiple machines used in this chapter and will further be aliased by their\n+respective fully qualified domain name (fqdn).\n+\n+* The backup server: `backup01.srv.local`\n+* The clients:\n+  * John Doe's desktop: `johndoe.clnt.local`\n+  * Webserver 01: `web01.srv.local`\n+  * Application server 01: `app01.srv.local`\n+\n+User and group\n+--------------\n+\n+The storage server needs to have only one UNIX user for all the clients.\n+Recommended user and group and additional settings:\n+\n+* User: `backup`\n+* Group: `backup`\n+* Shell: e.g `/bin/bash` which is capable to run the `borg serve` command\n+\n+The clients probably will initiate a backup from the root user to catch all\n+users, groups and permissions (e.g when backupping `/home`).\n+\n+Folders\n+-------\n+\n+The following folder tree layout is suggested on the storage server:\n+\n+* User home directory, /home/backup\n+* Repositories path (storage pool): /home/backup/repos\n+* Clients restricted paths: `/home/backup/repos/<client fqdn>`\n+  * johndoe.clnt.local: `/home/backup/repos/johndoe.clnt.local`\n+  * web01.srv.local: `/home/backup/repos/web01.srv.local`\n+  * app01.srv.local: `/home/backup/repos/app01.srv.local`\n+\n+Restrictions\n+------------\n+\n+We need to restric the clients into their paths. Borg needs to be instructed to\n+enforce this: ``borg serve --restrict-path /home/backup/repos/<client fqdn>``\n+\n+Clients can have one or more allowed ssh keys. Albeit recommended is to only use\n+one per client. We add keys for ``johndoe.clnt.local``, ``web01.srv.local`` and\n+``app01.srv.local``. Only they run under the user ``backup@backup01.srv.local``. A option\n+per on-line of ``authorized_keys`` is added to distinguish between the clients:\n+\n+::\n+\n+  command=\"cd /home/backup/repos/<client fqdn>;","path":"docs/deployment.rst","position":60,"original_position":60,"commit_id":"1a6f6f55503ff089bf3ca3f971aa83c91c0515e9","original_commit_id":"1a6f6f55503ff089bf3ca3f971aa83c91c0515e9","user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"body":"is the \"cd\" needed?","created_at":"2016-01-07T00:24:50Z","updated_at":"2016-01-07T00:24:50Z","html_url":"https://github.com/borgbackup/borg/pull/529#discussion_r49028851","pull_request_url":"https://api.github.com/repos/borgbackup/borg/pulls/529","_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments/49028851"},"html":{"href":"https://github.com/borgbackup/borg/pull/529#discussion_r49028851"},"pull_request":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/529"}}},"pull_request":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/529","id":55276645,"html_url":"https://github.com/borgbackup/borg/pull/529","diff_url":"https://github.com/borgbackup/borg/pull/529.diff","patch_url":"https://github.com/borgbackup/borg/pull/529.patch","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/529","number":529,"state":"open","locked":false,"title":"Docs: deployment example","user":{"login":"xor-gate","id":1050166,"avatar_url":"https://avatars.githubusercontent.com/u/1050166?v=3","gravatar_id":"","url":"https://api.github.com/users/xor-gate","html_url":"https://github.com/xor-gate","followers_url":"https://api.github.com/users/xor-gate/followers","following_url":"https://api.github.com/users/xor-gate/following{/other_user}","gists_url":"https://api.github.com/users/xor-gate/gists{/gist_id}","starred_url":"https://api.github.com/users/xor-gate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xor-gate/subscriptions","organizations_url":"https://api.github.com/users/xor-gate/orgs","repos_url":"https://api.github.com/users/xor-gate/repos","events_url":"https://api.github.com/users/xor-gate/events{/privacy}","received_events_url":"https://api.github.com/users/xor-gate/received_events","type":"User","site_admin":false},"body":"This is just a example how a borg backup server could be configured and used.\r\nAs this is just and idea, I keep it is open for discussion. Other people will also need to solve the centralised/offsite backup server problem.","created_at":"2016-01-06T22:50:53Z","updated_at":"2016-01-07T00:24:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66557843c1e5ac19a2c429d34b4cec9f2ce05eda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/borgbackup/borg/pulls/529/commits","review_comments_url":"https://api.github.com/repos/borgbackup/borg/pulls/529/comments","review_comment_url":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/529/comments","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/1a6f6f55503ff089bf3ca3f971aa83c91c0515e9","head":{"label":"xor-gate:doc-deployment","ref":"doc-deployment","sha":"1a6f6f55503ff089bf3ca3f971aa83c91c0515e9","user":{"login":"xor-gate","id":1050166,"avatar_url":"https://avatars.githubusercontent.com/u/1050166?v=3","gravatar_id":"","url":"https://api.github.com/users/xor-gate","html_url":"https://github.com/xor-gate","followers_url":"https://api.github.com/users/xor-gate/followers","following_url":"https://api.github.com/users/xor-gate/following{/other_user}","gists_url":"https://api.github.com/users/xor-gate/gists{/gist_id}","starred_url":"https://api.github.com/users/xor-gate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xor-gate/subscriptions","organizations_url":"https://api.github.com/users/xor-gate/orgs","repos_url":"https://api.github.com/users/xor-gate/repos","events_url":"https://api.github.com/users/xor-gate/events{/privacy}","received_events_url":"https://api.github.com/users/xor-gate/received_events","type":"User","site_admin":false},"repo":{"id":49160774,"name":"borg","full_name":"xor-gate/borg","owner":{"login":"xor-gate","id":1050166,"avatar_url":"https://avatars.githubusercontent.com/u/1050166?v=3","gravatar_id":"","url":"https://api.github.com/users/xor-gate","html_url":"https://github.com/xor-gate","followers_url":"https://api.github.com/users/xor-gate/followers","following_url":"https://api.github.com/users/xor-gate/following{/other_user}","gists_url":"https://api.github.com/users/xor-gate/gists{/gist_id}","starred_url":"https://api.github.com/users/xor-gate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xor-gate/subscriptions","organizations_url":"https://api.github.com/users/xor-gate/orgs","repos_url":"https://api.github.com/users/xor-gate/repos","events_url":"https://api.github.com/users/xor-gate/events{/privacy}","received_events_url":"https://api.github.com/users/xor-gate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xor-gate/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":true,"url":"https://api.github.com/repos/xor-gate/borg","forks_url":"https://api.github.com/repos/xor-gate/borg/forks","keys_url":"https://api.github.com/repos/xor-gate/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xor-gate/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xor-gate/borg/teams","hooks_url":"https://api.github.com/repos/xor-gate/borg/hooks","issue_events_url":"https://api.github.com/repos/xor-gate/borg/issues/events{/number}","events_url":"https://api.github.com/repos/xor-gate/borg/events","assignees_url":"https://api.github.com/repos/xor-gate/borg/assignees{/user}","branches_url":"https://api.github.com/repos/xor-gate/borg/branches{/branch}","tags_url":"https://api.github.com/repos/xor-gate/borg/tags","blobs_url":"https://api.github.com/repos/xor-gate/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xor-gate/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xor-gate/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/xor-gate/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xor-gate/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/xor-gate/borg/languages","stargazers_url":"https://api.github.com/repos/xor-gate/borg/stargazers","contributors_url":"https://api.github.com/repos/xor-gate/borg/contributors","subscribers_url":"https://api.github.com/repos/xor-gate/borg/subscribers","subscription_url":"https://api.github.com/repos/xor-gate/borg/subscription","commits_url":"https://api.github.com/repos/xor-gate/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/xor-gate/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/xor-gate/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/xor-gate/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/xor-gate/borg/contents/{+path}","compare_url":"https://api.github.com/repos/xor-gate/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xor-gate/borg/merges","archive_url":"https://api.github.com/repos/xor-gate/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xor-gate/borg/downloads","issues_url":"https://api.github.com/repos/xor-gate/borg/issues{/number}","pulls_url":"https://api.github.com/repos/xor-gate/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/xor-gate/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/xor-gate/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xor-gate/borg/labels{/name}","releases_url":"https://api.github.com/repos/xor-gate/borg/releases{/id}","created_at":"2016-01-06T20:49:46Z","updated_at":"2016-01-06T20:49:47Z","pushed_at":"2016-01-06T22:54:34Z","git_url":"git://github.com/xor-gate/borg.git","ssh_url":"git@github.com:xor-gate/borg.git","clone_url":"https://github.com/xor-gate/borg.git","svn_url":"https://github.com/xor-gate/borg","homepage":"https://borgbackup.github.io/","size":2531,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"borgbackup:master","ref":"master","sha":"19afaa813c9b8bc0d090239b64ab8428beaf857e","user":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"repo":{"id":35517126,"name":"borg","full_name":"borgbackup/borg","owner":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/borgbackup/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":false,"url":"https://api.github.com/repos/borgbackup/borg","forks_url":"https://api.github.com/repos/borgbackup/borg/forks","keys_url":"https://api.github.com/repos/borgbackup/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/borgbackup/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/borgbackup/borg/teams","hooks_url":"https://api.github.com/repos/borgbackup/borg/hooks","issue_events_url":"https://api.github.com/repos/borgbackup/borg/issues/events{/number}","events_url":"https://api.github.com/repos/borgbackup/borg/events","assignees_url":"https://api.github.com/repos/borgbackup/borg/assignees{/user}","branches_url":"https://api.github.com/repos/borgbackup/borg/branches{/branch}","tags_url":"https://api.github.com/repos/borgbackup/borg/tags","blobs_url":"https://api.github.com/repos/borgbackup/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/borgbackup/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/borgbackup/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/borgbackup/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/borgbackup/borg/languages","stargazers_url":"https://api.github.com/repos/borgbackup/borg/stargazers","contributors_url":"https://api.github.com/repos/borgbackup/borg/contributors","subscribers_url":"https://api.github.com/repos/borgbackup/borg/subscribers","subscription_url":"https://api.github.com/repos/borgbackup/borg/subscription","commits_url":"https://api.github.com/repos/borgbackup/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/borgbackup/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/borgbackup/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/borgbackup/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/borgbackup/borg/contents/{+path}","compare_url":"https://api.github.com/repos/borgbackup/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/borgbackup/borg/merges","archive_url":"https://api.github.com/repos/borgbackup/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/borgbackup/borg/downloads","issues_url":"https://api.github.com/repos/borgbackup/borg/issues{/number}","pulls_url":"https://api.github.com/repos/borgbackup/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/borgbackup/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/borgbackup/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/borgbackup/borg/labels{/name}","releases_url":"https://api.github.com/repos/borgbackup/borg/releases{/id}","created_at":"2015-05-12T23:10:47Z","updated_at":"2016-01-06T04:15:51Z","pushed_at":"2016-01-06T22:54:35Z","git_url":"git://github.com/borgbackup/borg.git","ssh_url":"git@github.com:borgbackup/borg.git","clone_url":"https://github.com/borgbackup/borg.git","svn_url":"https://github.com/borgbackup/borg","homepage":"https://borgbackup.github.io/","size":2697,"stargazers_count":430,"watchers_count":430,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":111,"forks":47,"open_issues":111,"watchers":430,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/529"},"html":{"href":"https://github.com/borgbackup/borg/pull/529"},"issue":{"href":"https://api.github.com/repos/borgbackup/borg/issues/529"},"comments":{"href":"https://api.github.com/repos/borgbackup/borg/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/borgbackup/borg/statuses/1a6f6f55503ff089bf3ca3f971aa83c91c0515e9"}}}}