* Ceph changes

* doc changes
This commit is contained in:
harshit-gangal 2016-09-08 03:17:34 +05:30 коммит произвёл Anthony Yeh
Родитель 3fa827017d
Коммит ea09eb79e8
4 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -50,7 +50,7 @@ access to the location where you are storing backups.
</tr>
<tr>
<td><nobr><code>-ceph_backup_storage_config</code></nobr></td>
<td>For the <code>ceph</code> plugin, this identifies the path to a text file with a JSON object as configuration. The JSON object requires the following keys: <code>accessKey</code>, <code>secretKey</code> and <code>endPoint</code>. Bucket name is computed from keyspace name and is separate for different keyspaces.</td>
<td>For the <code>ceph</code> plugin, this identifies the path to a text file with a JSON object as configuration. The JSON object requires the following keys: <code>accessKey</code>, <code>secretKey</code>, <code>endPoint</code> and <code>useSSL</code>. Bucket name is computed from keyspace name and is separate for different keyspaces.</td>
</tr>
<tr>
<td><nobr><code>-restore_from_backup</code></nobr></td>

Просмотреть файл

@ -1,5 +1,6 @@
{
"accessKey" : "AccessKey",
"secretKey" : "SecretKey",
"endPoint" : "URL"
"endPoint" : "URL",
"useSSL" : true
}

Просмотреть файл

@ -30,6 +30,7 @@ var storageConfig struct {
AccessKey string `json:"accessKey"`
SecretKey string `json:"secretKey"`
EndPoint string `json:"endPoint"`
UseSSL bool `json:"useSSL"`
}
// CephBackupHandle implements BackupHandle for Ceph Cloud Storage.
@ -135,6 +136,10 @@ func (bs *CephBackupStorage) ListBackups(dir string) ([]backupstorage.BackupHand
doneCh := make(chan struct{})
for object := range c.ListObjects(bucket, searchPrefix, false, doneCh) {
if object.Err != nil {
err := c.BucketExists(bucket)
if err != nil {
return nil, nil
}
return nil, object.Err
}
subdir := strings.TrimPrefix(object.Key, searchPrefix)
@ -246,8 +251,9 @@ func (bs *CephBackupStorage) client() (*minio.Client, error) {
accessKey := storageConfig.AccessKey
secretKey := storageConfig.SecretKey
url := storageConfig.EndPoint
useSSL := storageConfig.UseSSL
client, err := minio.NewV2(url, accessKey, secretKey, true)
client, err := minio.NewV2(url, accessKey, secretKey, useSSL)
if err != nil {
return nil, err
}

8
vendor/vendor.json поставляемый
Просмотреть файл

@ -449,10 +449,12 @@
"revisionTime": "2016-04-24T11:30:07Z"
},
{
"checksumSHA1": "FR9klLOXPp3dMRN8Y0nzSbNynVk=",
"checksumSHA1": "FPCHcnP9aY7A/69F8bbOJGqZoxo=",
"path": "github.com/minio/minio-go",
"revision": "17b4ebd52505bde655e3b14df732e31850641bb7",
"revisionTime": "2016-04-14T21:22:01Z"
"revision": "9f282f76643244430e3d0b69dc7285628a8db8a7",
"revisionTime": "2016-07-19T21:19:03Z",
"version": "v2.0.1",
"versionExact": "v2.0.1"
},
{
"checksumSHA1": "fb3i4XcL9StitSFLi/5pgGtRXDk=",