Milvus-Backup is a tool that allows users to backup and restore Milvus data. This tool can be utilized either through the command line or an API server.
The Milvus-backup process has negligible impact on the performance of Milvus. Milvus cluster is fully functional and can operate normally while backup and restoration are in progress.
Download binary from release page. Usually the latest is recommended.
Use homebrew to install on Mac
brew install zilliztech/tap/milvus-backup
Milvus-backup provides command line and API server for usage.
In order to use Milvus-Backup, access to Milvus proxy and Minio cluster is required. Configuration settings related to this access can be edited in backup.yaml.
[!NOTE]
Please ensure that the configuration settings for Minio are accurate. There may be variations in the default value of Minio's configuration depending on how Milvus is deployed, either by docker-compose or k8s. field docker-compose helm bucketName a-bucket milvus-bucket rootPath files file
Milvus-backup establish CLI based on cobra. Use the following command to see all the usage.
milvus-backup is a backup&restore tool for milvus.
Usage:
milvus-backup [flags]
milvus-backup [command]
Available Commands:
check check if the connects is right.
create create subcommand create a backup.
delete delete subcommand delete backup by name.
get get subcommand get backup by name.
help Help about any command
list list subcommand shows all backup in the cluster.
restore restore subcommand restore a backup.
server server subcommand start milvus-backup RESTAPI server.
Flags:
--config string config YAML file of milvus (default "backup.yaml")
-h, --help help for milvus-backup
Use "milvus-backup [command] --help" for more information about a command.
Here is a demo for a complete backup and restore process.
To start the RESTAPI server, use the following command after building:
./milvus-backup server
The server will listen on port 8080 by default. However, you can change it by using the -p
parameter as shown below:
./milvus-backup server -p 443
We offer a demo of the key APIs; however, please refer to the Swagger UI for the most up-to-date usage details, as the demo may occasionally become outdated.
We offer access to our Swagger UI, which displays comprehensive information for our APIs. To view it, simply go to
http://localhost:8080/api/v1/docs/index.html
Cross Storage Backup: Data is read from the source storage and written to a different storage through the Milvus-backup service. Such as, S3 -> local, S3 a -> S3 b.
RBAC Backup&Restore: Enable backup and restore RBAC meta with extra parameter.
For developers, Milvus-backup is easy to contribute to.
Execute make all
will generate an executable binary milvus-backup
in the {project_path}/bin
directory.
Developers can also test it using an IDE. core/backup_context_test.go
contains test demos for all main interfaces. Alternatively, you can test it using the command line interface:
cd core
go test -v -test.run TestCreateBackup
milvus-backup is licensed under the Apache License, Version 2.0.