Use Qiniu qshell to back up data and upload files
Qshell is a command line tool based on the Qiniu API reference manual that makes it easy for developers to test and use the Qiniu API service.
Qshell is officially released by Qiniu and can be downloaded from Qiniu's website.
Qshell documents: https://github.com/qiniu/qshell
Yum-y install go
Wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip & unzip qshell-linux-x86-v2.4.0.zip
Mv qshell-linux-x86-v2.4.0 / usr/local/qshell
/ usr/local/qshell AccessKey SecretKey Zone
# enter your own key, secret key and area, and you can go to the meeting to check your secret key https://portal.qiniu.com/user/key
Area code (please refer to the official documentation for details):
East China nb North China bc South China hn North American na
Backup folder location, here is an example of the following path:
Mkdir / www/backup
Profile creation:
Vi / www/backup/backup2qiniu.txt # file_type is storage type, 1 is low frequency, 0 is standard
{
"src_dir": "/ www/backup"
"access_key": "AccessKey"
"secret_key": "SecretKey"
"bucket": "backup"
"zone": "bc"
"rescan_local": true
"skip_path_prefixes": "backup2qiniu.txt"
"file_type": 1
}
Create a test file:
Touch / www/backup/test.txt
/ usr/local/qshell qupload / www/backup/backup2qiniu.txt
# upload the test, and then go to the platform to see if it is successful.