{"action":"created","comment":{"url":"https://api.github.com/repos/SUSE/doc-cap/pulls/comments/245139385","pull_request_review_id":189190656,"id":245139385,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTEzOTM4NQ==","diff_hunk":"@@ -521,5 +523,249 @@\n     </listitem>\n    </varlistentry>\n   </variablelist>\n+ </sect2>\n+ </sect1>\n+ <sect1 xml:id=\"sec.cap.backup-restore-of-raw-data\">\n+  <title>Raw data backup and restore of SCF</title>\n+  <para>\n+   A backup and restore of a SCF deployment's raw data can be used to migrate all data (applications, services, etc.) to a new SCF deployment. Specifically, the components migrated are:\n+  </para>\n+  <itemizedlist>\n+    <listitem>\n+     <para>\n+      The Cloud Controller Database (CCDB). (See <xref linkend=\"sec.cap.backup-restore-plugin-scope\"/> on what the CCDB backup encompasses.)\n+     </para>\n+    </listitem>\n+    <listitem>\n+     <para>\n+      The Cloud Controller Blobstore, which includes the types of binary large object (blob) files listed below. (See <link xlink:href=\"https://docs.cloudfoundry.org/concepts/architecture/cloud-controller.html#blob-store\">Blobstore</link> to learn more about each blob type.)\n+     </para>\n+     <itemizedlist>\n+      <listitem>\n+       <para>\n+        App Packages\n+       </para>\n+      </listitem>\n+      <listitem>\n+       <para>\n+        Buildpacks\n+       </para>\n+      </listitem>\n+      <listitem>\n+       <para>\n+        Resource Cache\n+       </para>\n+      </listitem>\n+      <listitem>\n+       <para>\n+        Buildpack Cache\n+       </para>\n+      </listitem>\n+      <listitem>\n+       <para>\n+        Droplets\n+       </para>\n+      </listitem>\n+     </itemizedlist>\n+    </listitem>\n+   </itemizedlist>\n+  <note>\n+   <title>Restore to the same version</title>\n+   <para>\n+    This process is intended for backing up and restoring to a target deployment with the same version as the source deployment.\n+   </para>\n+  </note>\n+  <sect2 xml:id=\"sec.cap.raw-data-backup-procedure\">\n+   <title>Performing a raw data backup</title>\n+   <para>\n+    Perform the following steps to create a backup of your source SCF deployment.\n+   </para>\n+   <procedure>\n+    <step>\n+     <para>\n+      Connect to the <literal>blobstore</literal> pod:\n+     </para>\n+<screen>&prompt.user;kubectl exec -it blobstore-0 --namespace scf -- env /bin/bash</screen>\n+    </step>\n+    <step>\n+     <para>\n+      Create an archive of the blobstore directory to preserve all needed files (droplets and other artifacts) then disconnect from the pod:\n+     </para>\n+<screen>&prompt.user;tar cfvz <replaceable>blobstore-src.tgz</replaceable> /var/vcap/store/shared</screen>\n+<screen>&prompt.user;exit</screen>\n+    </step>\n+    <step>\n+     <para>\n+      Copy the archive to a location outside of the pod:\n+     </para>\n+<screen>&prompt.user;kubectl cp scf/blobstore-0:blobstore-src.tar.gz <replaceable>/tmp/blobstore-src.tgz</replaceable></screen>\n+    </step>\n+    <step>\n+     <para>\n+      Export the Cloud Controller Database (CCDB) into a file:\n+     </para>\n+<screen>&prompt.user;kubectl exec mysql-0 --namespace scf -- bash -c \\\n+  '/var/vcap/packages/mariadb/bin/mysqldump \\\n+  --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf \\\n+  ccdb' > <replaceable>/tmp/ccdb-src.sql</replaceable>\n+</screen>\n+    </step>\n+    <step xml:id=\"get-encryption-key\">\n+     <para>\n+      Next, obtain the CCDB encryption key(s). The method used to capture the key will depend on whether <literal>current_key_label</literal> has been defined on the source cluster. This value is defined in <filename>/var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml</filename> of the <literal>api-group-0</literal> pod and also found in various tables of the MySQL database.\n+     </para>\n+     <para>\n+      Begin by examining the config file for the<literal>current_key_label</literal> setting:\n+     </para>\n+<screen>&prompt.user;kubectl exec -it --namespace scf api-group-0 -- bash -c \"cat /var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml | grep -A 3 database_encryption\"</screen>\n+     <itemizedlist>\n+      <listitem>\n+       <para>\n+        If the output contains the <literal>current_key_label</literal> setting, save the output for the restoration process. Adjust the <command>-A</command> flag as needed to include all keys.\n+       </para>\n+      </listitem>\n+      <listitem>\n+       <para>\n+        If the output does not contain the <literal>current_key_label</literal> setting, run the following command and save the output for the restoration process:\n+       </para>\n+      <screen>&prompt.user;kubectl exec api-0 --namespace scf -- bash -c 'echo $DB_ENCRYPTION_KEY'</screen>\n+      </listitem>\n+     </itemizedlist>\n+    </step>\n+   </procedure>\n+  </sect2>\n+  <sect2 xml:id=\"sec.cap.raw-data-restore-procedure\">\n+   <title>Performing a raw data restore</title>\n+   <para>\n+    Perform the following steps to restore your backed up data to the target SCF deployment.\n+   </para>\n+   <important>\n+    <title>Ensure access to the correct SCF deployment</title>\n+     <para>\n+      Working with multiple &kube; clusters simultaneously can be confusing. Ensure you're communicating with the desired cluster <link xlink:href=\"https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable\">by setting <literal>$KUBECONFIG</literal> correctly</link>.\n+     </para>","path":"xml/cap_admin_backup-restore.xml","position":182,"original_position":164,"commit_id":"fcde67d3da1a19b5743da5d0fb77df36f5e37f01","original_commit_id":"1589e11d3717387ef7edd8fb2f481a2ec984b1ec","user":{"login":"btat","id":1832069,"node_id":"MDQ6VXNlcjE4MzIwNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1832069?v=4","gravatar_id":"","url":"https://api.github.com/users/btat","html_url":"https://github.com/btat","followers_url":"https://api.github.com/users/btat/followers","following_url":"https://api.github.com/users/btat/following{/other_user}","gists_url":"https://api.github.com/users/btat/gists{/gist_id}","starred_url":"https://api.github.com/users/btat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btat/subscriptions","organizations_url":"https://api.github.com/users/btat/orgs","repos_url":"https://api.github.com/users/btat/repos","events_url":"https://api.github.com/users/btat/events{/privacy}","received_events_url":"https://api.github.com/users/btat/received_events","type":"User","site_admin":false},"body":"Addressed in https://github.com/SUSE/doc-cap/pull/280/commits/fcde67d3da1a19b5743da5d0fb77df36f5e37f01","created_at":"2019-01-03T21:30:06Z","updated_at":"2019-01-03T21:30:06Z","html_url":"https://github.com/SUSE/doc-cap/pull/280#discussion_r245139385","pull_request_url":"https://api.github.com/repos/SUSE/doc-cap/pulls/280","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/comments/245139385"},"html":{"href":"https://github.com/SUSE/doc-cap/pull/280#discussion_r245139385"},"pull_request":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/280"}},"in_reply_to_id":245027600},"pull_request":{"url":"https://api.github.com/repos/SUSE/doc-cap/pulls/280","id":241879850,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxODc5ODUw","html_url":"https://github.com/SUSE/doc-cap/pull/280","diff_url":"https://github.com/SUSE/doc-cap/pull/280.diff","patch_url":"https://github.com/SUSE/doc-cap/pull/280.patch","issue_url":"https://api.github.com/repos/SUSE/doc-cap/issues/280","number":280,"state":"open","locked":false,"title":"Add raw data backup and restore","user":{"login":"btat","id":1832069,"node_id":"MDQ6VXNlcjE4MzIwNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1832069?v=4","gravatar_id":"","url":"https://api.github.com/users/btat","html_url":"https://github.com/btat","followers_url":"https://api.github.com/users/btat/followers","following_url":"https://api.github.com/users/btat/following{/other_user}","gists_url":"https://api.github.com/users/btat/gists{/gist_id}","starred_url":"https://api.github.com/users/btat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btat/subscriptions","organizations_url":"https://api.github.com/users/btat/orgs","repos_url":"https://api.github.com/users/btat/repos","events_url":"https://api.github.com/users/btat/events{/privacy}","received_events_url":"https://api.github.com/users/btat/received_events","type":"User","site_admin":false},"body":"Add chapter and https://github.com/SUSE/doc-cap/commit/2e5d85949930d31922322a570f2232f6f0ce381f can now refer to something that exists","created_at":"2019-01-03T00:13:04Z","updated_at":"2019-01-03T21:30:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4054a780457a31c53a847f46ef8bd522ee8e42b4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SUSE/doc-cap/pulls/280/commits","review_comments_url":"https://api.github.com/repos/SUSE/doc-cap/pulls/280/comments","review_comment_url":"https://api.github.com/repos/SUSE/doc-cap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SUSE/doc-cap/issues/280/comments","statuses_url":"https://api.github.com/repos/SUSE/doc-cap/statuses/fcde67d3da1a19b5743da5d0fb77df36f5e37f01","head":{"label":"SUSE:raw-data-backup-restore","ref":"raw-data-backup-restore","sha":"fcde67d3da1a19b5743da5d0fb77df36f5e37f01","user":{"login":"SUSE","id":1067733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":102939706,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI5Mzk3MDY=","name":"doc-cap","full_name":"SUSE/doc-cap","private":false,"owner":{"login":"SUSE","id":1067733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SUSE/doc-cap","description":"SUSE Container Application Platform Documentation","fork":false,"url":"https://api.github.com/repos/SUSE/doc-cap","forks_url":"https://api.github.com/repos/SUSE/doc-cap/forks","keys_url":"https://api.github.com/repos/SUSE/doc-cap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/doc-cap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/doc-cap/teams","hooks_url":"https://api.github.com/repos/SUSE/doc-cap/hooks","issue_events_url":"https://api.github.com/repos/SUSE/doc-cap/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/doc-cap/events","assignees_url":"https://api.github.com/repos/SUSE/doc-cap/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/doc-cap/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/doc-cap/tags","blobs_url":"https://api.github.com/repos/SUSE/doc-cap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/doc-cap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/doc-cap/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/doc-cap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/doc-cap/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/doc-cap/languages","stargazers_url":"https://api.github.com/repos/SUSE/doc-cap/stargazers","contributors_url":"https://api.github.com/repos/SUSE/doc-cap/contributors","subscribers_url":"https://api.github.com/repos/SUSE/doc-cap/subscribers","subscription_url":"https://api.github.com/repos/SUSE/doc-cap/subscription","commits_url":"https://api.github.com/repos/SUSE/doc-cap/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/doc-cap/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/doc-cap/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/doc-cap/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/doc-cap/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/doc-cap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/doc-cap/merges","archive_url":"https://api.github.com/repos/SUSE/doc-cap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/doc-cap/downloads","issues_url":"https://api.github.com/repos/SUSE/doc-cap/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/doc-cap/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/doc-cap/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/doc-cap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/doc-cap/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/doc-cap/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/doc-cap/deployments","created_at":"2017-09-09T08:34:09Z","updated_at":"2019-01-02T22:14:10Z","pushed_at":"2019-01-03T21:26:42Z","git_url":"git://github.com/SUSE/doc-cap.git","ssh_url":"git@github.com:SUSE/doc-cap.git","clone_url":"https://github.com/SUSE/doc-cap.git","svn_url":"https://github.com/SUSE/doc-cap","homepage":"","size":3755,"stargazers_count":12,"watchers_count":12,"language":"Dockerfile","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":8,"open_issues":26,"watchers":12,"default_branch":"develop"}},"base":{"label":"SUSE:develop","ref":"develop","sha":"75df772066ec12e42ae110832132b842cb2250dd","user":{"login":"SUSE","id":1067733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":102939706,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI5Mzk3MDY=","name":"doc-cap","full_name":"SUSE/doc-cap","private":false,"owner":{"login":"SUSE","id":1067733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SUSE/doc-cap","description":"SUSE Container Application Platform Documentation","fork":false,"url":"https://api.github.com/repos/SUSE/doc-cap","forks_url":"https://api.github.com/repos/SUSE/doc-cap/forks","keys_url":"https://api.github.com/repos/SUSE/doc-cap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/doc-cap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/doc-cap/teams","hooks_url":"https://api.github.com/repos/SUSE/doc-cap/hooks","issue_events_url":"https://api.github.com/repos/SUSE/doc-cap/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/doc-cap/events","assignees_url":"https://api.github.com/repos/SUSE/doc-cap/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/doc-cap/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/doc-cap/tags","blobs_url":"https://api.github.com/repos/SUSE/doc-cap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/doc-cap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/doc-cap/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/doc-cap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/doc-cap/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/doc-cap/languages","stargazers_url":"https://api.github.com/repos/SUSE/doc-cap/stargazers","contributors_url":"https://api.github.com/repos/SUSE/doc-cap/contributors","subscribers_url":"https://api.github.com/repos/SUSE/doc-cap/subscribers","subscription_url":"https://api.github.com/repos/SUSE/doc-cap/subscription","commits_url":"https://api.github.com/repos/SUSE/doc-cap/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/doc-cap/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/doc-cap/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/doc-cap/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/doc-cap/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/doc-cap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/doc-cap/merges","archive_url":"https://api.github.com/repos/SUSE/doc-cap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/doc-cap/downloads","issues_url":"https://api.github.com/repos/SUSE/doc-cap/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/doc-cap/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/doc-cap/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/doc-cap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/doc-cap/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/doc-cap/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/doc-cap/deployments","created_at":"2017-09-09T08:34:09Z","updated_at":"2019-01-02T22:14:10Z","pushed_at":"2019-01-03T21:26:42Z","git_url":"git://github.com/SUSE/doc-cap.git","ssh_url":"git@github.com:SUSE/doc-cap.git","clone_url":"https://github.com/SUSE/doc-cap.git","svn_url":"https://github.com/SUSE/doc-cap","homepage":"","size":3755,"stargazers_count":12,"watchers_count":12,"language":"Dockerfile","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":8,"open_issues":26,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/280"},"html":{"href":"https://github.com/SUSE/doc-cap/pull/280"},"issue":{"href":"https://api.github.com/repos/SUSE/doc-cap/issues/280"},"comments":{"href":"https://api.github.com/repos/SUSE/doc-cap/issues/280/comments"},"review_comments":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/280/comments"},"review_comment":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SUSE/doc-cap/pulls/280/commits"},"statuses":{"href":"https://api.github.com/repos/SUSE/doc-cap/statuses/fcde67d3da1a19b5743da5d0fb77df36f5e37f01"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"btat"}}