milvus-backup icon indicating copy to clipboard operation
milvus-backup copied to clipboard

[Bug]: milvus2.2.6版本,使用0.2.2版本backup,restore的时候collection无数据

Open lizihang opened this issue 6 months ago • 5 comments

Current Behavior

1.使用命令进行备份 ./milvus-backup create -n backup1 --colls k_1522222211111111aaaaaaaaaaaaaaaa 2.同一套环境,进行恢复 ./milvus-backup restore -n backup1 -s _recover 3.通过attu查看,collection存在,数据不存在

Expected Behavior

1.查看minio备份情况,备份的bucket和数据都存在 image 2.查看attu,collection存在,数据没有恢复 image 3.我的backup.yaml如下: 配置文件目录:/home/runner/work/milvus-backup/milvus-backup/configs 配置文件内容:

# Configures the system log output.
log:
  level: info # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
  console: true # whether print log to console
  file:
    rootPath: "logs/backup.log"

http:
  simpleResponse: true

# milvus proxy address, compatible to milvus.yaml
milvus:
  address: localhost
  port: 19530
  authorizationEnabled: true
  # tls mode values [0, 1, 2]
  # 0 is close, 1 is one-way authentication, 2 is two-way authentication.
  tlsMode: 0
  user: "root"
  password: "xxx"

# Related configuration of minio, which is responsible for data persistence for Milvus.
minio:
  # cloudProvider: "minio" # deprecated use storageType instead
  storageType: "minio" # support storage type: local, minio, s3, aws, gcp, ali(aliyun), azure, tc(tencent)

  address: localhost # Address of MinIO/S3
  port: 29000   # Port of MinIO/S3
  accessKeyID: minioadmin  # accessKeyID of MinIO/S3
  secretAccessKey: minioadmin # MinIO/S3 encryption string
  useSSL: false # Access to MinIO/S3 with SSL
  useIAM: false
  iamEndpoint: ""

  #bucketName: "milvus-bucket" # Milvus Bucket name in MinIO/S3, make it the same as your milvus instance
  #rootPath: "file" # Milvus storage root path in MinIO/S3, make it the same as your milvus instance
  
  bucketName: "a-bucket" # Milvus Bucket name in MinIO/S3, make it the same as your milvus instance
  rootPath: "files" # Milvus storage root path in MinIO/S3, make it the same as your milvus instance

  # only for azure
  backupAccessKeyID: minioadmin  # accessKeyID of MinIO/S3
  backupSecretAccessKey: minioadmin # MinIO/S3 encryption string
  backupBucketName: "backup" # Bucket name to store backup data. Backup data will store to backupBucketName/backupRootPath
  backupRootPath: "files" # Rootpath to store backup data. Backup data will store to backupBucketName/backupRootPath

4.执行restore的日志如下:

[2024/08/02 14:56:06.634 +08:00] [INFO] [logutil/logutil.go:165] ["Log directory"] [configDir=]
[2024/08/02 14:56:06.634 +08:00] [INFO] [logutil/logutil.go:166] ["Set log file to "] [path=logs/backup.log]
[2024/08/02 14:56:06.635 +08:00] [INFO] [core/backup_context.go:1021] ["receive RestoreBackupRequest"] [requestId=4a792964-509c-11ef-b3cb-00163e160f4f] [backupName=backup1] [collections="[]"] [CollectionSuffix=_recover3] [CollectionRenames={}] [async=false] [bucketName=] [path=]
[2024/08/02 14:56:06.638 +08:00] [INFO] [storage/minio_chunk_manager.go:112] ["minio chunk manager init success."] [bucketname=backup] [root=files]
[2024/08/02 14:56:06.639 +08:00] [INFO] [core/backup_context.go:792] ["receive GetBackupRequest"] [requestId=4a79cdda-509c-11ef-b3cb-00163e160f4f] [backupName=backup1] [backupId=] [bucketName=] [path=]
[2024/08/02 14:56:06.652 +08:00] [INFO] [core/backup_context.go:868] ["finish GetBackupRequest"] [requestId=4a79cdda-509c-11ef-b3cb-00163e160f4f] [backupName=backup1] [backupId=] [bucketName=] [path=] [resp="requestId:\"4a79cdda-509c-11ef-b3cb-00163e160f4f\" msg:\"success\" data:<id:\"5caf399f-5099-11ef-aa6d-00163e160f4f\" state_code:BACKUP_SUCCESS start_time:1722580508699 end_time:1722580509255 name:\"backup1\" backup_timestamp:1722580508699 collection_backups:<collection_id:451558583090550985 collection_name:\"k_1522222211111111aaaaaaaaaaaaaaaa\" schema:<name:\"k_1522222211111111aaaaaaaaaaaaaaaa\" description:\"example collection\" fields:<fieldID:100 name:\"id\" is_primary_key:true data_type:Int64 autoID:true > fields:<fieldID:101 name:\"knowledge_id\" data_type:VarChar type_params:<key:\"max_length\" value:\"20\" > > fields:<fieldID:102 name:\"base_org_id\" data_type:VarChar type_params:<key:\"max_length\" value:\"64\" > > fields:<fieldID:103 name:\"bus_org_id\" data_type:VarChar type_params:<key:\"max_length\" value:\"64\" > > fields:<fieldID:104 name:\"doc_id\" data_type:VarChar type_params:<key:\"max_length\" value:\"20\" > > fields:<fieldID:105 name:\"doc_section_id\" data_type:VarChar type_params:<key:\"max_length\" value:\"20\" > > fields:<fieldID:106 name:\"page_num\" data_type:VarChar type_params:<key:\"max_length\" value:\"20\" > > fields:<fieldID:107 name:\"row_num\" data_type:Int64 > fields:<fieldID:108 name:\"type\" data_type:VarChar type_params:<key:\"max_length\" value:\"20\" > > fields:<fieldID:109 name:\"doc_section\" data_type:FloatVector type_params:<key:\"dim\" value:\"1024\" > > > shards_num:2 consistency_level:Bounded partition_backups:<partition_id:451558583090550986 partition_name:\"_default\" collection_id:451558583090550985 load_state:\"Loaded\" > partition_backups:<partition_id:451558583090551048 partition_name:\"p_152222221111111aadf\" collection_id:451558583090550985 segment_backups:<segment_id:451558583090751060 collection_id:451558583090550985 partition_id:451558583090551048 num_of_rows:546 binlogs:<binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/0/451558583090754122\" log_size:572 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/0/451559238445767028\" log_size:1424 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/0/451559673586723050\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/0/451559673586726157\" log_size:864 > > binlogs:<fieldID:1 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/1/451558583090754123\" log_size:543 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/1/451559238445767029\" log_size:637 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/1/451559673586723051\" log_size:533 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/1/451559673586726158\" log_size:585 > > binlogs:<fieldID:100 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/100/451558583090754112\" log_size:572 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/100/451559238445767018\" log_size:1424 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/100/451559673586723040\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/100/451559673586726147\" log_size:864 > > binlogs:<fieldID:101 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/101/451558583090754113\" log_size:558 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/101/451559238445767019\" log_size:566 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/101/451559673586723041\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/101/451559673586726148\" log_size:565 > > binlogs:<fieldID:102 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/102/451558583090754114\" log_size:634 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/102/451559238445767020\" log_size:642 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/102/451559673586723042\" log_size:633 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/102/451559673586726149\" log_size:641 > > binlogs:<fieldID:103 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/103/451558583090754115\" log_size:634 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/103/451559238445767021\" log_size:642 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/103/451559673586723043\" log_size:633 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/103/451559673586726150\" log_size:641 > > binlogs:<fieldID:104 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/104/451558583090754116\" log_size:433 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/104/451559238445767022\" log_size:484 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/104/451559673586723044\" log_size:432 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/104/451559673586726151\" log_size:472 > > binlogs:<fieldID:105 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/105/451558583090754117\" log_size:620 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/105/451559238445767023\" log_size:1930 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/105/451559673586723045\" log_size:607 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/105/451559673586726152\" log_size:1021 > > binlogs:<fieldID:106 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/106/451558583090754118\" log_size:439 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/106/451559238445767024\" log_size:786 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/106/451559673586723046\" log_size:437 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/106/451559673586726153\" log_size:620 > > binlogs:<fieldID:107 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/107/451558583090754119\" log_size:558 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/107/451559238445767025\" log_size:1197 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/107/451559673586723047\" log_size:552 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/107/451559673586726154\" log_size:817 > > binlogs:<fieldID:108 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/108/451558583090754120\" log_size:470 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/108/451559238445767026\" log_size:493 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/108/451559673586723048\" log_size:468 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/108/451559673586726155\" log_size:481 > > binlogs:<fieldID:109 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/109/451558583090754121\" log_size:56884 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/109/451559238445767027\" log_size:1252183 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/109/451559673586723049\" log_size:47827 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751060/109/451559673586726156\" log_size:572094 > > deltalogs:<> size:1958783 > segment_backups:<segment_id:451558583090751061 collection_id:451558583090550985 partition_id:451558583090551048 num_of_rows:566 binlogs:<binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/0/451558583090754109\" log_size:577 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/0/451559238445767041\" log_size:1494 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/0/451559673586723037\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/0/451559673586726170\" log_size:815 > > binlogs:<fieldID:1 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/1/451558583090754110\" log_size:543 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/1/451559238445767042\" log_size:632 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/1/451559673586723038\" log_size:533 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/1/451559673586726171\" log_size:586 > > binlogs:<fieldID:100 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/100/451558583090754099\" log_size:577 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/100/451559238445767031\" log_size:1494 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/100/451559673586723027\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/100/451559673586726160\" log_size:815 > > binlogs:<fieldID:101 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/101/451558583090754100\" log_size:558 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/101/451559238445767032\" log_size:566 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/101/451559673586723028\" log_size:557 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/101/451559673586726161\" log_size:565 > > binlogs:<fieldID:102 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/102/451558583090754101\" log_size:634 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/102/451559238445767033\" log_size:642 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/102/451559673586723029\" log_size:633 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/102/451559673586726162\" log_size:641 > > binlogs:<fieldID:103 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/103/451558583090754102\" log_size:634 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/103/451559238445767034\" log_size:642 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/103/451559673586723030\" log_size:633 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/103/451559673586726163\" log_size:641 > > binlogs:<fieldID:104 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/104/451558583090754103\" log_size:433 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/104/451559238445767035\" log_size:482 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/104/451559673586723031\" log_size:432 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/104/451559673586726164\" log_size:473 > > binlogs:<fieldID:105 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/105/451558583090754104\" log_size:617 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/105/451559238445767036\" log_size:2032 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/105/451559673586723032\" log_size:600 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/105/451559673586726165\" log_size:964 > > binlogs:<fieldID:106 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/106/451558583090754105\" log_size:440 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/106/451559238445767037\" log_size:809 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/106/451559673586723033\" log_size:432 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/106/451559673586726166\" log_size:608 > > binlogs:<fieldID:107 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/107/451558583090754106\" log_size:561 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/107/451559238445767038\" log_size:1224 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/107/451559673586723034\" log_size:552 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/107/451559673586726167\" log_size:783 > > binlogs:<fieldID:108 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/108/451558583090754107\" log_size:470 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/108/451559238445767039\" log_size:494 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/108/451559673586723035\" log_size:456 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/108/451559673586726168\" log_size:484 > > binlogs:<fieldID:109 binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/109/451558583090754108\" log_size:62778 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/109/451559238445767040\" log_size:1339702 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/109/451559673586723036\" log_size:47807 > binlogs:<log_path:\"files/insert_log/451558583090550985/451558583090551048/451558583090751061/109/451559673586726169\" log_size:511313 > > deltalogs:<> size:1991472 > size:3950255 load_state:\"Loaded\" > backup_timestamp:451564144689152 size:3950255 index_infos:<field_name:\"doc_section\" index_name:\"_default_idx_109\" index_type:\"IVF_FLAT\" params:<key:\"index_type\" value:\"IVF_FLAT\" > params:<key:\"metric_type\" value:\"L2\" > params:<key:\"params\" value:\"{\\\"nlist\\\": 128}\" > > load_state:\"Loaded\" backup_physical_timestamp:1722580508 > milvus_version:\"v2.2.6\" > "]
[2024/08/02 14:56:06.654 +08:00] [INFO] [core/backup_context.go:1134] ["Collections to restore"] [collection_num=1]
[2024/08/02 14:56:06.657 +08:00] [INFO] [core/backup_context.go:1219] ["executeRestoreBackupTask start"] [backup_name=backup1] [backupBucketName=backup] [backupPath=files/backup1]
[2024/08/02 14:56:06.657 +08:00] [INFO] [core/backup_context.go:1258] ["start restore"] [collection_name=k_1522222211111111aaaaaaaaaaaaaaaa_recover3] [backupBucketName=backup] [backupPath=files/backup1]
[2024/08/02 14:56:06.678 +08:00] [INFO] [core/backup_context.go:1299] ["create collection"] [collectionName=k_1522222211111111aaaaaaaaaaaaaaaa_recover3]
[2024/08/02 14:56:06.679 +08:00] [INFO] [core/backup_context.go:1316] ["create partition"] [collectionName=k_1522222211111111aaaaaaaaaaaaaaaa_recover3] [partitionName=_default]
[2024/08/02 14:56:06.685 +08:00] [INFO] [core/backup_context.go:1316] ["create partition"] [collectionName=k_1522222211111111aaaaaaaaaaaaaaaa_recover3] [partitionName=p_152222221111111aadf]
[2024/08/02 14:56:06.685 +08:00] [INFO] [core/backup_context.go:1457] [getBackupPartitionPaths] [bucketName=backup] [backupPath=files/backup1] [partitionID=451558583090551048]
[2024/08/02 14:56:06.693 +08:00] [INFO] [core/backup_context.go:1422] ["bulkinsert task state"] [id=451560655018337307] [state=5] [state="{\"ID\":451560655018337307,\"State\":5,\"RowCount\":0,\"IDList\":null,\"Infos\":{\"backup\":\"true\",\"collection\":\"k_1522222211111111aaaaaaaaaaaaaaaa_recover3\",\"end_ts\":\"451564144689152\",\"failed_reason\":\"\",\"files\":\"files/backup1/binlogs/insert_log/451558583090550985/451558583090551048/,\",\"partition\":\"p_152222221111111aadf\",\"persist_cost\":\"0.00\",\"progress_percent\":\"90\"},\"CollectionID\":451560655018337299,\"SegmentIDs\":null,\"CreateTs\":1722581766}"] [progress=90] [currentTimestamp=1722581766] [lastUpdateTime=1722581766]

Steps To Reproduce

No response

Environment

Docker version 26.1.3
milvus version 2.6.6
milvus-backup version 0.2.2

Anything else?

No response

lizihang avatar Aug 02 '24 09:08 lizihang