Location>code7788 >text

Seven Bulls cloud storage data, delete useless data

Popularity:242 ℃/2024-10-17 13:50:42
Recently, the company has a business, due to years of using the Seven Bulls cloud to store data [some pictures, files], resulting in several T of space, in fact, there are a number of years ago a large number of data is no longer in use, so the need to delete this batch of data.
It is important to note that data from several years ago and data generated by current operations are stored in a single storage space and must be filtered according to time if they are to be deleted.
For example, all data before 2022 is deleted:
Idea: data backup, although the data is no longer in use, but still be careful, now the data backup in the deletion, see the official documents of the Seven Bulls cloud, delete data is not based on time screening this function, but the interesting thing is that you can filter according to the name of a document within the record of the data to screen, so we want to delete the name of the data to be stored in a document to achieve the want to delete the useless data we want to delete the function of the useless:
Query statement: qshell stat space-name file-name Import the file to be queried into a txt file: qhsell listbucket2 space-name --stat 2022-01-01 --end 2024-01-01 --show-fields Key > Delete the name of the data recorded in the txt file: qshell batchdelete Space name -i --force
One more thing on how to do data backup:
Data backup can not be filtered, can only be a library of all the data to backup, so before the backup to see how much data in the Seven Bulls cloud library, in the preparation of a hard disk or USB flash drive, capacity rain data can be, the following thing backup statements:
Backup files in space: [need config file to configure yourself] { "dest_dir" : "D:\qshell-v2.13.0-windows-amd64\qiniuyunfile", "bucket" : "xxxxxxx" } Backup statement: qdownload -c 10 [-c followed by the number of threads is the number of threads in the above The configuration file above.
Note: Backup first before deleting the operation, folks. As for the qshell download tool, brothers go to the Internet search qshell keywords can be found.