It is believed that many webmasters are using Qiniuyun to store pictures Js and other static files. Sometimes when you want to back them up, you don't know how to download them in batches? How can I download Qiniu Cloud storage files locally in batches? Qiniu official has actually given an interface, but the official textbook is relatively simple. Today, Xi'an SEO will give you details Qiniu Cloud Storage File Batch Download to Local Method 。
Take the pictures of Watson's blog on Qiniu Cloud as an example to demonstrate batch downloading:
1. Download the official batch download tool
2. Deploy batch download files
Unzip the downloaded file and place it under the qiniuxiaozai (D: qiniuxiaozai) folder on disk D of the computer. As shown in the figure below.
3. Edit wosn.conf file
Open the wosn.conf file with Notepad, then edit the configuration file and save it. After completion, it is roughly as follows:
Profile Description
dest_dir |
Download file storage path, file storage directory |
bucket |
Qiniuyun Space Name |
domain |
Secondary domain name bound in the background |
access_key |
AK backstage provided by Qiniu is available |
secret_key |
SK backstage provided by Qiniu is available |
is_private |
Whether it is private space true, false |
prefix |
Attachment prefix (generally left blank) |
suffix |
Attachment suffix (generally left blank) |
The values of access_key and secret_key can be obtained from the key management of the personal center in the background of Qiniu Cloud.
4、 Cmd command execution
Fill in the configuration file, and then execute the command. The keyboard [win+R] shortcut key opens the [Run] window, and enter cmd to enter the dos command mode of the Windows system.
Then enter [D:] into the directory of disk D, and then enter [cd qiniuxiazai] into the qiniuxiazai folder under disk D, and finally execute the command [qshell qdownload 10 wosn. conf] (qshell qdownload is the command; the number of concurrent processes downloaded by 10 can be interpreted as the download speed from 1 to 10.). As shown in the figure below
I only have about 100 pictures here, which will be downloaded in dozens of seconds. In the QINIUWOSN folder on the computer disk D, all the files on the 7N wosn subdomain are downloaded, as shown in the following figure.
5. Expand and extend
If you want to move the image to another storage space, you need to upload the image to the folder corresponding to the space, and then use the following two SQL commands to replace the link about Qiniu in the database with the new image link address.
- UPDATE ? wp_posts? SET ? post_content?=? REPLACE (? Post_content, 'http://Qiniu domain name address. com1. z0. glb. clouddn. com', 'new image address')?;
- UPDATE ? wp_posts? SET ? post_content?=? REPLACE (? post_content,'http://? Qiniu domain name address. qiniudn. com ',' new picture address')?;
The image link address of Qiniu can be seen in "Content Management". As shown below
At this point, the method of downloading Qiniu Cloud storage files to local in batches is over. Hurry up and toss about
PS: Pay attention to whether your computer is 32-bit or 64 bit.
AD : Please click here to support Watson's blog!