English
To make it easier for developers to migrate their business from the public beta version to the official version, we provide the function of one-click migration from the public beta version to the official version. Developers can log in to the [uniCloud console](https://unicloud.dcloud.net. cn) operation migration, the process is as follows:
To migrate from the beta version to the official version, you need to place an order to purchase the official version space to be migrated through the migrate official version
operation. This operation will add a migration binding relationship for the two spaces to facilitate subsequent migration configurations.
When migrating, you can choose the new space to use As you go or Monthly package.
If you choose a package, at present, based on the average usage level of the public beta version of the old service space in the last 30 days, a total of 12 billing indicators will be compared with the thresholds of different packages. The minimum package meets every indicator without exceeding the limit.
After coordination with Alibaba Cloud, a new version of the recommended package plan has been launched, and only 5 billing indicators are mandatory to be verified:
Satisfy these 5 indicators, you can migrate. Packages whose other metrics exceed usage will warn, but also allow migration.
If your migration options only have pay-as-you-go and no packages, it means that even the most advanced packages are not enough.
Because the old space does not provide traffic statistics, and has always been free. As a result, many developers do not know how much their traffic and storage consumption is, and they may be surprised by the standard of the lowest package.
For developers who think that the package exceeds expectations, it may be that there are too many useless files in the storage or the code needs to be optimized. It is recommended to switch to pay-as-you-go. Run for a day to see where the usage is consumed and where the problem is, and then optimize the code. and storage to keep costs down.
Although the number of users is small, the packages are highly recommended. Common problems include:
DCloud is always a product service company that provides developers with more cost-effective solutions. DCloud will not deliberately recommend high-end packages that developers do not need in order to make money.
At present, the monthly package can be converted to pay-as-you-go, but the pay-as-you-go package cannot be converted to a monthly package. We will push Alibaba Cloud to solve it as soon as possible.
Before purchasing the space to be migrated, you can already obtain the domain name uploaded and downloaded by the cloud storage after migration. If you want to develop a MiniApp, since the white list of the security domain name of the MiniApp is cached on the client, it is recommended to change the cloud storage domain name to Add to whitelist**.
When placing an order, you can set the execution time of the migration task. The migration time only supports a time point within two hours to three days. You can change the migration time before the execution starts.
Since the official version space to be migrated is a brand new and independent space, a new SpaceId will be assigned after creation, and the rule is mp-public beta version SpaceId
.
In order to be more compatible in cloud functions/cloud objects, when purchasing the official space to be migrated, you can choose Whether to be compatible with SpaceID in cloud functions/cloud object codes
, if this option is enabled, the cloud functions/cloud objects after migration The context.SPACEINFO.spaceId
obtained in context.SPACEINFO.spaceId
and the SpaceId in cloudInfo
will remain unchanged, and will still be the SpaceId of the original beta version. Developers can use context.SPACEINFO.useOldSpaceId
or cloudInfo.useOldSpaceId
to judge whether the currently obtained spaceId is before migration. true means that the service space id obtained by the current service space in the cloud function is the service space id before migration , otherwise it is the new space id. For running local cloud functions, this feature is supported starting from HBuilderX 3.6.13
, and the cloud supports this feature by default. **The new service space id after migration is prefixed with mp-
to the old space id. **
Notice:
Migrate Official Version
supports one-click migration, and the original official version space cannot use this function.api.next.bspapp.com
to the request domain name whitelistThe system will automatically start the migration task at the set migration time. The migration logic and precautions are as follows:
Whether the service can be normal during the migration: Yes
Migration type: Senseless migration
Migration time-consuming: none
Alibaba Cloud public beta version callFunction requests and cloud object calls use the domain name api.bspapp.com
, and the official version is api.next.bspapp.com
. In order to prevent old clients (clients released before migration) from being unable to access the new service space after migration, Alibaba Cloud forwards the request. After the migration is complete, the old client will still request api.bspapp.com
and Alibaba Cloud will send Requests sent to the old space are forwarded to the new space. In order to ensure that the old version of the client can normally request the cloud function before and after the migration
Whether it is the default domain name or a custom domain name, the urlization access is similar to the above forwarding logic. Developers can also resolve custom domain names to new spaces, eliminating the logic of request forwarding.
Whether the service can be normal during the migration: Yes
Migration type: Senseless migration
Migration time-consuming: about 3-5 minutes
Whether the service can be normal during the migration: Yes
Migration type: Senseless migration
Migration time-consuming: very short, negligible
文件上传失败
,web端上传请求会返回403错误码),需要使用更新的HBuilderX版本重新发布应用(不管是app、小程序、web均需要重新发布,app端可使用wgt更新)。cli创建的项目需要更新项目依赖,参考:修改依赖为指定版本Whether the service can be normal during the migration: can be accessed normally, but cannot be uploaded
Migration type: Feeling migration, no files can be uploaded during migration
Migration time-consuming: a single file is large in size, and it takes about 1 minute to migrate 1GB; a single file is small in size and there are many files, and it takes about 30 minutes for 10,000 files
Whether the service can be normal during the migration: Yes
Migration type: Feeling migration, after the migration is completed, the custom domain name needs to be re-bound and resolved to the official version
Migration time-consuming: a single file is large in size, and it takes about 1 minute to migrate 1GB; a single file is small in size and there are many files, and it takes about 30 minutes for 10,000 files
After the migration task is completed, the data related to the service space of the public beta version in the business will be migrated to the official version:
At this time, the public beta version of the service space will not be able to operate in the uniCloud console, and cannot be associated with HBuilderX. The official version of the service space has completely replaced the public beta version, and can be associated with HBuilderX for packaging .
If a custom domain name is bound, the service space of the public beta version will still be requested. At this time, the files uploaded from the official version will not be reversely synchronized to the public beta version, resulting in the custom domain name being unable to access newly uploaded files.
Since the custom domain name is still bound to the service space of the public beta version, the status of the domain name hosted on the front-end webpage of the official version space is Need to unbind and rebind
The developer needs to delete the custom domain name in the uniCloud console and then bind it again. After obtaining the new CNAME through this operation, replace the domain name resolution to the new CNAME to complete the domain transfer. During this period, access to the custom domain name hosted on the front-end webpage will be interrupted. It is recommended to deal with it when the traffic volume is low.
Many developers use uniCloud because of services such as text messaging, one-click app login, iOS universal links, app uni-upgrade-center, and uni statistics.
After Alibaba Cloud bills, how much do developers care about the costs caused by these businesses? We conduct calculations for developers, and the specific results are as follows:
Rewarded video server callback
[iOS Universal Links](https://uniapp.dcloud.net.cn/api/plugins/universal-links.html#%E4%BA%91%E8%B5%84%E6%BA%90%E6%B6 %88%E8%80%97%E8%AF%B4%E6%98%8E)