{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/48939976","id":48939976,"diff_hunk":"@@ -0,0 +1,111 @@\n+#\n+# Copyright 2015, SUSE LINUX GmbH\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#   http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n+class BackupController < ApplicationController\n+  #\n+  # Backup\n+  #\n+  # Provides the restful api call for\n+  # /utils/backup \tGET \tReturns a json list of available backups\n+  def index\n+    @backups = Backup.all\n+\n+    respond_to do |format|\n+      format.html do\n+        flash.now[:info] = t(\".upgrade_info\")\n+      end\n+      format.json { render json: @backups }\n+    end\n+  end\n+\n+  #\n+  # Backup\n+  #\n+  # Provides the restful api call for\n+  # /utils/backup   POST   Trigger a backup\n+  def backup\n+    @backup = Backup.new(\n+      name: params[:filename]\n+    )\n+    respond_to do |format|\n+      if !@backup.nil? && @backup.save\n+        format.json { head :ok }\n+        format.html { redirect_to backup_path }\n+      else\n+        msg = I18n.t(\".invalid_filename\", scope: \"backup.index\")","path":"crowbar_framework/app/controllers/backup_controller.rb","position":48,"original_position":48,"commit_id":"95fbce77b4fd2931bd5a48b9282c437e0d29836b","original_commit_id":"95fbce77b4fd2931bd5a48b9282c437e0d29836b","user":{"login":"vuntz","id":1758783,"avatar_url":"https://avatars.githubusercontent.com/u/1758783?v=3","gravatar_id":"","url":"https://api.github.com/users/vuntz","html_url":"https://github.com/vuntz","followers_url":"https://api.github.com/users/vuntz/followers","following_url":"https://api.github.com/users/vuntz/following{/other_user}","gists_url":"https://api.github.com/users/vuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/vuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuntz/subscriptions","organizations_url":"https://api.github.com/users/vuntz/orgs","repos_url":"https://api.github.com/users/vuntz/repos","events_url":"https://api.github.com/users/vuntz/events{/privacy}","received_events_url":"https://api.github.com/users/vuntz/received_events","type":"User","site_admin":false},"body":"See https://github.com/crowbar/crowbar-core/pull/144/files#r48939967","created_at":"2016-01-06T09:31:15Z","updated_at":"2016-01-06T09:31:15Z","html_url":"https://github.com/crowbar/barclamp-crowbar/pull/1359#discussion_r48939976","pull_request_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359","_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/48939976"},"html":{"href":"https://github.com/crowbar/barclamp-crowbar/pull/1359#discussion_r48939976"},"pull_request":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359","id":53851392,"html_url":"https://github.com/crowbar/barclamp-crowbar/pull/1359","diff_url":"https://github.com/crowbar/barclamp-crowbar/pull/1359.diff","patch_url":"https://github.com/crowbar/barclamp-crowbar/pull/1359.patch","issue_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1359","number":1359,"state":"open","locked":false,"title":"[tex] backport backup part from cloud6","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"body":"take only the necessary parts to make a backup\r\n\r\nthe related PR is https://github.com/crowbar/crowbar-core/pull/144","created_at":"2015-12-16T14:57:42Z","updated_at":"2016-01-06T09:31:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b92b65d1bc92a023b98b577f3140e72011d7633e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359/commits","review_comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359/comments","review_comment_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1359/comments","statuses_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/95fbce77b4fd2931bd5a48b9282c437e0d29836b","head":{"label":"MaximilianMeister:backport/crowbar-backup","ref":"backport/crowbar-backup","sha":"95fbce77b4fd2931bd5a48b9282c437e0d29836b","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"repo":{"id":30590732,"name":"barclamp-crowbar","full_name":"MaximilianMeister/barclamp-crowbar","owner":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaximilianMeister/barclamp-crowbar","description":"Crowbar Core: Core Application","fork":true,"url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar","forks_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/forks","keys_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/teams","hooks_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/hooks","issue_events_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/issues/events{/number}","events_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/events","assignees_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/assignees{/user}","branches_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/branches{/branch}","tags_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/tags","blobs_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/statuses/{sha}","languages_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/languages","stargazers_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/stargazers","contributors_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/contributors","subscribers_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/subscribers","subscription_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/subscription","commits_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/contents/{+path}","compare_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/merges","archive_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/downloads","issues_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/issues{/number}","pulls_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/pulls{/number}","milestones_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/milestones{/number}","notifications_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/labels{/name}","releases_url":"https://api.github.com/repos/MaximilianMeister/barclamp-crowbar/releases{/id}","created_at":"2015-02-10T12:19:11Z","updated_at":"2015-02-10T12:19:13Z","pushed_at":"2016-01-05T13:01:45Z","git_url":"git://github.com/MaximilianMeister/barclamp-crowbar.git","ssh_url":"git@github.com:MaximilianMeister/barclamp-crowbar.git","clone_url":"https://github.com/MaximilianMeister/barclamp-crowbar.git","svn_url":"https://github.com/MaximilianMeister/barclamp-crowbar","homepage":"https://github.com/crowbar/crowbar","size":34555,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"crowbar:release/tex/master","ref":"release/tex/master","sha":"96d12453cf5e9e99df06a7a9a81e72c76a1149f2","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":2351384,"name":"barclamp-crowbar","full_name":"crowbar/barclamp-crowbar","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/barclamp-crowbar","description":"Crowbar Core: Core Application","fork":false,"url":"https://api.github.com/repos/crowbar/barclamp-crowbar","forks_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/forks","keys_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/teams","hooks_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/hooks","issue_events_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/events","assignees_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/tags","blobs_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/languages","stargazers_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/stargazers","contributors_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/contributors","subscribers_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/subscribers","subscription_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/subscription","commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/merges","archive_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/downloads","issues_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/releases{/id}","created_at":"2011-09-08T20:47:56Z","updated_at":"2015-11-05T04:53:13Z","pushed_at":"2016-01-05T13:01:46Z","git_url":"git://github.com/crowbar/barclamp-crowbar.git","ssh_url":"git@github.com:crowbar/barclamp-crowbar.git","clone_url":"https://github.com/crowbar/barclamp-crowbar.git","svn_url":"https://github.com/crowbar/barclamp-crowbar","homepage":"https://github.com/crowbar/crowbar","size":36058,"stargazers_count":75,"watchers_count":75,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":184,"mirror_url":null,"open_issues_count":8,"forks":184,"open_issues":8,"watchers":75,"default_branch":"release/tex/master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359"},"html":{"href":"https://github.com/crowbar/barclamp-crowbar/pull/1359"},"issue":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1359"},"comments":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1359/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1359/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/95fbce77b4fd2931bd5a48b9282c437e0d29836b"}}}}