You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
GCS support for repository storage.
GCS and GCS-compatible object stores can now be used for repository storage.
This commit is contained in:
@ -6,9 +6,11 @@ Repository Create Command
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "common/memContext.h"
|
||||
#include "common/type/json.h"
|
||||
#include "config/config.h"
|
||||
#include "storage/helper.h"
|
||||
#include "storage/azure/storage.intern.h"
|
||||
#include "storage/gcs/storage.intern.h"
|
||||
#include "storage/s3/storage.intern.h"
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
@ -29,6 +31,14 @@ cmdRepoCreate(void)
|
||||
(StorageAzure *)storageDriver(storageRepoWrite()), HTTP_VERB_PUT_STR,
|
||||
.query = httpQueryAdd(httpQueryNewP(), AZURE_QUERY_RESTYPE_STR, AZURE_QUERY_VALUE_CONTAINER_STR));
|
||||
}
|
||||
else if (strEq(storageType(storageRepo()), STORAGE_GCS_TYPE_STR))
|
||||
{
|
||||
KeyValue *kvContent = kvPut(kvNew(), GCS_JSON_NAME_VAR, VARSTR(cfgOptionStr(cfgOptRepoGcsBucket)));
|
||||
|
||||
storageGcsRequestP(
|
||||
(StorageGcs *)storageDriver(storageRepoWrite()), HTTP_VERB_POST_STR, .noBucket = true,
|
||||
.content = BUFSTR(jsonFromKv(kvContent)));
|
||||
}
|
||||
}
|
||||
MEM_CONTEXT_TEMP_END();
|
||||
|
||||
|
Reference in New Issue
Block a user