-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine cross storage backup and add doc
Signed-off-by: wayblink <anyang.wang@zilliz.com>
- Loading branch information
Showing
7 changed files
with
142 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Cross storage backup & restore | ||
|
||
Previously, Milvus-backup utilized the Copy API of the storage client to back up data. | ||
This limited the backup capability to the same storage type as the Milvus cluster. | ||
However, there's a significant demand for cross-storage backups—for instance, | ||
backup data from Minio to a local disk or backup from in-house storage to cloud storage. | ||
|
||
Starting from version v0.4.21, Milvus-backup now supports cross-storage backups. | ||
In this process, data is read from the source storage and written to the target storage through the Milvus-backup service. | ||
|
||
This feature is currently in Beta. `azure` is not supported. Not all storage types are fully tested. | ||
|
||
## Usage | ||
|
||
To enable cross-storage backup, you only need to adjust the configurations in backup.yaml. | ||
|
||
You can use `./milvus-backup check` first to see if the cross copy is working. | ||
|
||
For example | ||
|
||
*Back up data from Minio to a local disk*: | ||
|
||
```yaml | ||
# Related configuration of minio, which is responsible for data persistence for Milvus. | ||
minio: | ||
storageType: "minio" | ||
address: localhost | ||
port: 9000 | ||
accessKeyID: minioadmin | ||
secretAccessKey: minioadmin | ||
bucketName: "a-bucket" | ||
rootPath: "files" | ||
|
||
backupStorageType: "local" | ||
backupRootPath: "/root/backup/" | ||
``` | ||
*Backup from Minio to S3* | ||
```yaml | ||
minio: | ||
storageType: "minio" | ||
address: localhost | ||
port: 9000 | ||
accessKeyID: minioadmin | ||
secretAccessKey: minioadmin | ||
useSSL: false | ||
useIAM: false | ||
iamEndpoint: "" | ||
bucketName: "a-bucket" | ||
rootPath: "files" | ||
|
||
backupStorageType: "s3" | ||
backupAddress: s3Address | ||
backupPort: 443 | ||
backupAccessKeyID: s3AccessKey | ||
backupSecretAccessKey: s3SecretAccessKey | ||
backupBucketName: "s3-bucket" | ||
backupRootPath: "s3-backup-path" | ||
``` | ||
*Backup from Minio A to Minio B* | ||
If the two storage locations are of the same type but belong to different services, | ||
you need to add an additional configuration crossStorage=true to explicitly indicate that it is a cross-storage backup or restore operation. | ||
```yaml | ||
minio: | ||
storageType: "minio" | ||
address: addressA | ||
port: 9000 | ||
accessKeyID: userA | ||
secretAccessKey: passwdB | ||
useSSL: false | ||
useIAM: false | ||
iamEndpoint: "" | ||
bucketName: "a-bucket" | ||
rootPath: "files" | ||
|
||
backupStorageType: "minio" | ||
backupAddress: addressB | ||
backupPort: 9000 | ||
backupAccessKeyID: userB | ||
backupSecretAccessKey: passwdB | ||
backupBucketName: "b-bucket" | ||
backupRootPath: "backup" | ||
|
||
# If you need to back up or restore data between two different storage systems, direct client-side copying is not supported. | ||
# Set this option to true to enable data transfer through Milvus Backup. | ||
# Note: This option will be automatically set to true if `minio.storageType` and `minio.backupStorageType` differ. | ||
# However, if they are the same but belong to different services, you must manually set this option to `true`. | ||
crossStorage: "true" | ||
``` |