For a long time, the automatic snapshot feature of Alibaba Cloud ECS has been relied on by zumeng. Indeed, this feature is very convenient and reliable, providing convenience for backing up websites, therefore, I have not used any other backup methods before. Yesterday, I suddenly felt that I should back up my website again. I just wanted to back up my website to Baidu online storage, but I was not able to get rid of all the updates and features of du Niang, after one lap, we will not provide support for the new pcs api! Well, the network disk is not reliable. If you suddenly think about it, simply back up it to Alibaba Cloud OSS. If your own Alibaba cloud server is using the intranet, the speed will be very good!
I just did what I did, but I have no experience at all. On Google, I saw a friend Zhang Ge's article "Python & Shell script combined with Alibaba Cloud OSS regular remote backup website", and then I stepped down step by step, it's basically OK. I checked it today and uploaded it to the OSS through automatic backup last night!
Now, I will not be a porter. I will go to the Zhangge website to view the tutorial. I will only talk about permission issues.
Please take a look at Zhang Ge's tutorial. Otherwise, you may not understand what I am talking about below..
The code is as follows: |
Copy code |
Note: If you have not encountered any permission issues according to the tutorial, you can ignore the following.
|
Because we create a "private" Bucket, we need to create access permissions. We have generated a "security token" AccessKey according to the Zhang Ge tutorial, however, by default, you do not have the permission to operate OSS (the error 403 is rejected). You can use "access control-user management" to add permissions to the corresponding users:
Ps: // img.cmhello.com/2016/10/0166-cmhello_com.png "/>
Then, the operation will not have the permission.
Alibaba Cloud OSS charges fees, but if the storage is small (within 40 GB), the price is very affordable! The paid services are used with confidence, unlike some network disks ......
Okay, that's it!