Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name:
spec:
clusterName: some-name
storageName:
backupSource:
type: physical
destination: s3://BACKUP-NAME
minio:
credentialsSecret: minio-secret
region: us-east-1
bucket: operator-testing
endpointUrl: minio-service:9000
insecureSkipTLSVerify: false
secure: false
7 changes: 7 additions & 0 deletions e2e-tests/demand-backup-physical-minio-native/run
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ backup_dest_minio=$(get_backup_dest "${backup_name_minio}")
run_restore ${backup_name_minio}
run_recovery_check ${backup_name_minio} "" "" "true"

echo 'Drop collection'
run_mongo_tls 'use myApp\n db.test.drop()' "myApp:myPass@${cluster}-rs0.${namespace}"
echo 'check backup and restore using backupSource -- minio'
backup_dest_minio=$(get_backup_dest "${backup_name_minio}")
run_restore_backupsource "${backup_name_minio}-source" "${backup_dest_minio}" "minio"
run_recovery_check "${backup_name_minio}-source" "" "" "true"

desc 'Testing with arbiter and non-voting nodes'

apply_cluster "${test_dir}/conf/${cluster}-arbiter-nv.yml"
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/psmdb/v1/perconaservermongodbrestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ func (r *PerconaServerMongoDBRestore) CheckFields() error {
r.Spec.BackupSource.S3 == nil &&
r.Spec.BackupSource.GCS == nil &&
r.Spec.BackupSource.Azure == nil &&
r.Spec.BackupSource.Minio == nil &&
r.Spec.BackupSource.Filesystem == nil {
return errors.New("one of storageName, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required")
return errors.New("one of storageName, backupSource.minio, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required")
}
}

Expand Down
Loading