pip install vodmigrate
git clone https://github.com/tencentyun/vod-migrate.gitcd vod-migratepython setup.py install
vodmigrate config.toml
migrateResultOutputPath, and the filename will be vod_migrate_result.txt.type indicates the migration type, which is filled in by users based on their migration needs. For example, to migrate local data to VOD, users need to configure type=migrateLocal for [migrateType].[migrateType]type="migrateLocal"
migrateType | Description |
migrateLocal | From local system to VOD |
migrateUrl | From download URL to VOD |
migrateCos | From Tencent Cloud COS to VOD |
migrateAws | From AWS S3 to VOD |
migrateAli | From Alibaba Cloud OSS to VOD |
migrateQiniu | From Qiniu Kodo to VOD |
# Common configuration for the migration tool[common]secretId = "SECRETID"secretKey = "SECRETKEY"region = 'REGION'subAppId = 0concurrency = 5supportMediaClassification = [ 'video', 'audio', 'image' ]excludeMediaType = [ ]migrateDbStoragePath = ''migrateResultOutputPath = ''
Name | Description |
secretId | SecretId of your key. Replace SECRETID with your real key information, which can be obtained on the TencentCloud API key page in the CAM console. |
secretKey | SecretKey of your key. Replace SECRETKEY with your real key information, which can be obtained on the TencentCloud API key page in the CAM console. |
region | Access point region, i.e., the region where to request a VOD server. This is different from the storage region. For more information, please see Region List. |
subAppId | ID of a subapplication in VOD. If you need to migrate a file into a subapplication, enter the subapplication ID in this field; otherwise, leave it empty. |
concurrency | Number of concurrently migrated files. Maximum value: 50 |
supportMediaClassification | List of media types supported for migration. Valid values: video, audio, image |
excludeMediaType | List of file types to be excluded |
migrateDbStoragePath | Save path of the migrated db. If this parameter is left empty, it means the current directory. |
migrateResultOutputPath | Save path of the migration result (one migration record corresponds to one line of JSON string). If this parameter is left empty, it means the current directory. |
[migrateType]. For example, if the configuration item of [migrateType] is type=migrateLocal, you only need to configure the [migrateLocal] section.migrateLocal# Configuration section for migration from a local system to VOD[migrateLocal]localPath = ''excludes = [ ]
Configuration Item | Description |
localPath | Local path, which should be an absolute path |
excludes | Absolute path of the directory to be excluded, which means that some files in the directory at localPath are not to be migrated |
migrateUrl# Configuration section for migration from a URL list to VOD[migrateUrl]urllistPath=D:\\\\folder\\\\urllist.txt
Configuration Item | Description |
urllistPath | Absolute path of the file storing the URL list. The file content is URL text containing one original URL address per line. |
# Configuration section for migration from Tencent Cloud COS to VOD[migrateCos]region = 'ap-shanghai'bucket = 'examplebucket-1250000000'secretId = 'COS_SECRETID'secretKey = 'COS_SECRETKEY'prefix = ''
Configuration Item | Description |
region | |
bucket | Name of the source bucket in the format of <BucketName-APPID>. The bucket name must include APPID, such as examplebucket-1250000000. |
secretId | SecretId of the key of the account to which the source bucket belongs. You can view this parameter in API Keys. |
secretKey | SecretKey of the key of the account to which the source bucket belongs. You can view this parameter in API Keys. |
prefix | Prefix of the path to be migrated. If all data in the bucket needs to be migrated, leave the prefix empty. |
migrateAws# Configuration section for migration from AWS S3 to VOD[migrateAws]region = 'ap-northeast-2'bucket = 'bucket-aws'accessKeyId = 'AccessKeyId'accessKeySecret = 'AccessKeySecret'prefix = ''
Configuration Item | Description |
region | AWS S3 region |
bucket | AWS S3 bucket name |
accessKeyId | Replace AccessKeyId with your real key information |
accessKeySecret | Replace AccessKeySecret with your real key information |
prefix | Prefix of the path to be migrated. If all data in the bucket needs to be migrated, leave the prefix empty |
migrateAli# Configuration section for migration from Alibaba Cloud OSS to VOD[migrateAli]bucket = 'bucket-aliyun'accessKeyId = 'yourAccessKeyId'accessKeySecret = 'yourAccessKeySecret'endPoint = 'oss-cn-hangzhou.aliyuncs.com'prefix = ''
Configuration Item | Description |
bucket | Alibaba Cloud OSS bucket name |
accessKeyId | Replace yourAccessKeyId with your real key information |
accessKeySecret | Replace yourAccessKeySecret with your real key information |
endPoint | Alibaba Cloud endpoint address |
prefix | Prefix of the path to be migrated. If all data in the bucket needs to be migrated, leave the prefix empty |
migrateQiniu# Configuration section for migration from Qiniu Kodo to VOD[migrateQiniu]bucket = 'bucket-qiniu'accessKeyId = 'AccessKey'accessKeySecret = 'SecretKey'endPoint = 'www.bkt.clouddn.com'prefix = ''
Configuration Item | Description |
bucket | Qiniu Kodo bucket name |
accessKeyId | Replace AccessKey with your real key information |
accessKeySecret | Replace SecretKey with your real key information |
endPoint | Download URL of Qiniu Kodo, which corresponds to downloadDomain |
prefix | Prefix of the path to be migrated. If all data in the bucket needs to be migrated, leave the prefix empty |
db file must be cleared (i.e., deleting migrate.db or modifying the db storage path) to avoid errors with configuration file MD5 verification.FileId, all of which are not related to each other.
Feedback