!6160 处理issue:使用gs_probackup时的部分打印信息需将oss修改为s3
Merge pull request !6160 from lukeman/oss
This commit is contained in:
@ -43,7 +43,7 @@ static void show_configure_json(ConfigOption *opt);
|
||||
#define OPTION_COMPRESS_GROUP "Compression parameters"
|
||||
#define OPTION_REMOTE_GROUP "Remote access parameters"
|
||||
#define OPTION_DSS_GROUP "DSS connect parameters"
|
||||
#define OPTION_OSS_GROUP "OSS connect parameters"
|
||||
#define OPTION_OSS_GROUP "S3 connect parameters"
|
||||
|
||||
/*
|
||||
* Short name should be non-printable ASCII character.
|
||||
@ -602,7 +602,7 @@ readInstanceConfigFile(const char *instance_name)
|
||||
'i', 235, "instance-id", &instance->dss.instance_id, SOURCE_CMD, (OptionSource)0,
|
||||
OPTION_DSS_GROUP, 0, option_get_value
|
||||
},
|
||||
/* OSS options */
|
||||
/* S3 options */
|
||||
{
|
||||
's', 236, "access-id",
|
||||
&instance_config.oss.access_id, SOURCE_CMD, (OptionSource)0,
|
||||
|
||||
@ -187,7 +187,7 @@ void do_retention(void)
|
||||
backup_merged = false;
|
||||
|
||||
if (current.media_type == MEDIA_TYPE_OSS) {
|
||||
elog(ERROR, "Not supported when specifying OSS options");
|
||||
elog(ERROR, "Not supported when specifying S3 options");
|
||||
}
|
||||
|
||||
/* Get a complete list of backups. */
|
||||
|
||||
@ -83,7 +83,7 @@ do_add_instance(InstanceConfig *instance)
|
||||
Oss::Oss* oss = getOssClient();
|
||||
char* bucket_name = getBucketName();
|
||||
if (!oss->BucketExists(bucket_name)) {
|
||||
elog(ERROR, "Bucket '%s' does not exist on OSS, please create it first.", bucket_name);
|
||||
elog(ERROR, "Bucket '%s' does not exist on S3, please create it first.", bucket_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ do_merge(time_t backup_id)
|
||||
|
||||
|
||||
if (current.media_type == MEDIA_TYPE_OSS) {
|
||||
elog(ERROR, "Not supported when specifying OSS options");
|
||||
elog(ERROR, "Not supported when specifying S3 options");
|
||||
}
|
||||
|
||||
if (backup_id == INVALID_BACKUP_ID)
|
||||
|
||||
@ -263,7 +263,7 @@ void backupFiles(FileAppender* appender, backup_files_arg* arg)
|
||||
time(&end_time);
|
||||
pretty_time_interval(difftime(end_time, start_time),
|
||||
pretty_time, lengthof(pretty_time));
|
||||
elog(INFO, "Backup files are backuped to oss, time elapsed: %s", pretty_time);
|
||||
elog(INFO, "Backup files are backuped to s3, time elapsed: %s", pretty_time);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ char* getBucketName()
|
||||
{
|
||||
char* bucket_name = instance_config.oss.access_bucket;
|
||||
if (bucket_name == NULL) {
|
||||
elog(ERROR, "Required parameter not specified: OSS(--bucket_name)");
|
||||
elog(ERROR, "Required parameter not specified: S3(--bucket_name)");
|
||||
}
|
||||
return bucket_name;
|
||||
}
|
||||
@ -282,7 +282,7 @@ Oss::Oss* getOssClient()
|
||||
const char* access_bucket = instance_config.oss.access_bucket;
|
||||
if (!endpoint || !access_key || !secret_key || !access_bucket) {
|
||||
elog(ERROR,
|
||||
"Required parameter not specified: OSS(--endpoint, --access_bucket, --access_id or --access_key)");
|
||||
"Required parameter not specified: S3(--endpoint, --access_bucket, --access_id or --access_key)");
|
||||
}
|
||||
oss_client = new Oss::Oss(endpoint, access_key, secret_key, region);
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ struct pgBackup
|
||||
|
||||
/* media type */
|
||||
MediaType media_type;
|
||||
/* local or oss */
|
||||
/* local or s3 */
|
||||
oss_status_t oss_status;
|
||||
/* sender context */
|
||||
SenderCxt* sender_cxt;
|
||||
|
||||
Reference in New Issue
Block a user