{"action":"created","issue":{"url":"https://api.github.com/repos/qiniu/php-sdk/issues/177","repository_url":"https://api.github.com/repos/qiniu/php-sdk","labels_url":"https://api.github.com/repos/qiniu/php-sdk/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/qiniu/php-sdk/issues/177/comments","events_url":"https://api.github.com/repos/qiniu/php-sdk/issues/177/events","html_url":"https://github.com/qiniu/php-sdk/pull/177","id":154440119,"number":177,"title":"Simple export tool for bucket","user":{"login":"elespec","id":2031830,"avatar_url":"https://avatars.githubusercontent.com/u/2031830?v=3","gravatar_id":"","url":"https://api.github.com/users/elespec","html_url":"https://github.com/elespec","followers_url":"https://api.github.com/users/elespec/followers","following_url":"https://api.github.com/users/elespec/following{/other_user}","gists_url":"https://api.github.com/users/elespec/gists{/gist_id}","starred_url":"https://api.github.com/users/elespec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elespec/subscriptions","organizations_url":"https://api.github.com/users/elespec/orgs","repos_url":"https://api.github.com/users/elespec/repos","events_url":"https://api.github.com/users/elespec/events{/privacy}","received_events_url":"https://api.github.com/users/elespec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-12T09:43:57Z","updated_at":"2016-05-16T02:17:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/qiniu/php-sdk/pulls/177","html_url":"https://github.com/qiniu/php-sdk/pull/177","diff_url":"https://github.com/qiniu/php-sdk/pull/177.diff","patch_url":"https://github.com/qiniu/php-sdk/pull/177.patch"},"body":"    <?php\r\n\r\n    require_once __DIR__ . '/../autoload.php';\r\n\r\n    use Qiniu\\Auth;\r\n    use Qiniu\\Storage\\BucketManager;\r\n    use Qiniu\\Storage\\BucketExporter;\r\n\r\n    $accessKey = 'Your ak';\r\n    $secretKey = 'Your sk';\r\n\r\n    //初始化Auth状态：\r\n    $auth = new Auth($accessKey, $secretKey);\r\n\r\n    //初始化BucketManager\r\n    $bucketExport = new BucketExporter($auth,'bucketName','/tmp/log/qiniu_log/');\r\n    $cmd=$bucketExport->syncBucketToLocal('http://bucketDomain/','/tmp/qiniu');\r\n    //var_dump($cmd);\r\n    //$cmd = 'nohup /bin/bash '.$cmdFile.' & ';\r\n    $shell=array();\r\n    foreach($cmd as $k=>$v)\r\n    {\r\n         $shell[]='/bin/bash \\''.$v.'\\'';\r\n    }\r\n    $shellStr=implode(' && ',$shell);\r\n    echo $shellStr.\"\\n\";\r\n\r\n    ?>"},"comment":{"url":"https://api.github.com/repos/qiniu/php-sdk/issues/comments/219335194","html_url":"https://github.com/qiniu/php-sdk/pull/177#issuecomment-219335194","issue_url":"https://api.github.com/repos/qiniu/php-sdk/issues/177","id":219335194,"user":{"login":"elespec","id":2031830,"avatar_url":"https://avatars.githubusercontent.com/u/2031830?v=3","gravatar_id":"","url":"https://api.github.com/users/elespec","html_url":"https://github.com/elespec","followers_url":"https://api.github.com/users/elespec/followers","following_url":"https://api.github.com/users/elespec/following{/other_user}","gists_url":"https://api.github.com/users/elespec/gists{/gist_id}","starred_url":"https://api.github.com/users/elespec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elespec/subscriptions","organizations_url":"https://api.github.com/users/elespec/orgs","repos_url":"https://api.github.com/users/elespec/repos","events_url":"https://api.github.com/users/elespec/events{/privacy}","received_events_url":"https://api.github.com/users/elespec/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T02:17:44Z","updated_at":"2016-05-16T02:17:44Z","body":"确实提交错位置了,应该算是应用,而且我总觉得应该由官方提供一款自动增量备份工具,现在备份工作做的很辛苦;"}}