oci에서 object storage를 사용하여 백업을 받기 위해 아래와 같이 작업을 수행함
1. oci object storage 생성
object storage에서 사용할 bucket를 생성함
2. oci object storage를 사용하기 위한 oci 환경 설정
yum install python36-oci-cli 설치
oci setup config 를 사용하여 ocid 정보 및 사용할 리젼 선택, 사용할 api key 생성
3. 2번에서 생성된 key를 oci 사용자 api key 설정에 추가
4. 아래와 같이 mysql shell를 사용하여 백업 수행
util.dumpSchemas(["classicmodels","test"], "test", {osBucketName:"mysqlbackup", osNamespace: "idazzjlcjqzj", threads:4, ocimds: true, compatibility: ["strip_restricted_grants"]})
Acquiring global read lock
Global read lock acquired
Initializing - done
2 schemas will be dumped and within them 8 tables, 0 views.
Gathering information - done
All transactions have been started
Locking instance for backup
Global read lock has been released
Checking for compatibility with MySQL Database Service 8.0.31
NOTE: Database `test` had unsupported ENCRYPTION option commented out
NOTE: Database `classicmodels` had unsupported ENCRYPTION option commented out
Compatibility issues with MySQL Database Service 8.0.31 were found and repaired. Please review the changes made before loading them.
Validating MDS compatibility - done
Writing global DDL files
Running data dump using 4 threads.
NOTE: Progress information uses estimated values and may not be accurate.
Writing schema metadata - done
Writing DDL - done
Writing table metadata - done
Starting data dump
100% (3.86K rows / ~3.86K rows), 0.00 rows/s, 0.00 B/s uncompressed, 0.00 B/s compressed
Dump duration: 00:00:00s
Total duration: 00:00:00s
Schemas dumped: 2
Tables dumped: 8
Uncompressed data size: 161.55 KB
Compressed data size: 56.21 KB
Compression ratio: 2.9
Rows written: 3864
Bytes written: 56.21 KB
Average uncompressed throughput: 161.55 KB/s
Average compressed throughput: 56.21 KB/s
'RDB > MySQL' 카테고리의 다른 글
mysql 8.0 explain format (0) | 2022.11.28 |
---|---|
docker로 mysql 이미지 설치 및 container 구성 (0) | 2022.11.22 |
mysql 8.0 replication 구성 (0) | 2022.10.24 |
MySQL 8.0 Optimization 변경사항 (0) | 2022.10.12 |
MySQL 8.0 특징 (0) | 2022.10.12 |