Data Backup Method, Electronic Device, Storage Medium, and Chip
AssigneeHonor Device Co., Ltd.
InventorsFucheng Liu, Kaihe Ye, Xing Wan, Ze Zhang
Life of this patent
Estimating the term…
Abstract
This disclosure provides a data backup method, an electronic device, and a storage medium. According to the method, in a current backup, a file list in a previous backup is obtained, the local file list in the previous backup is compared with a local file list in the current backup, to find an added file and a modified file, the added file and the modified file are uploaded to a cloud server for backup, and an identical file is not repeatedly uploaded to the cloud server for backup. When the added file and the modified file are backed up, different processing manners may be used for a regular file, a small file, and a large file.
Claims20
A data backup method, comprising:
- generating, by an electronic device, a first file list based on attribute information of a directory file in a current backup, wherein the attribute information comprises a file type;
- obtaining, by the electronic device, a second file list in a previous backup, wherein the second file list comprises the attribute information of the directory file in the previous backup;
- obtaining, by the electronic device, a synchronization type of differential files in the directory file based on the first file list and the second file list, wherein the synchronization type comprises added or modified, wherein in a case that the file type comprises a large file type, the differential files comprise a modified large file and an added large file, wherein the modified large file is a large file whose synchronization type is modified, and wherein the added large file is a large file whose synchronization type is added;
- and
- sending, by the electronic device, the differential files to a cloud server.
An electronic device, comprising:
- a memory configured to store a computer program;
- and
- one or more processors configured to execute the computer program to configure the electronic device to perform operations of:
- generating, by an electronic device, a first file list based on attribute information of a directory file in a current backup, wherein the attribute information comprises a file type;
- obtaining, by the electronic device, a second file list in a previous backup, wherein the second file list comprises the attribute information of the directory file in the previous backup;
- obtaining, by the electronic device, a synchronization type of differential files in the directory file based on the first file list and the second file list, wherein the synchronization type comprises added or modified, wherein in a case that the file type comprises a large file type, the differential files comprise a modified large file and an added large file, wherein the modified large file is a large file whose synchronization type is modified, and wherein the added large file is a large file whose synchronization type is added;
- and
- sending, by the electronic device, the differential files to a cloud server.
A non-transitory computer-readable storage medium storing computer instructions that when run on an electronic device, configure the electronic device to perform operations of:
- generating, by an electronic device, a first file list based on attribute information of a directory file in a current backup, wherein the attribute information comprises a file type;
- obtaining, by the electronic device, a second file list in a previous backup, wherein the second file list comprises the attribute information of the directory file in the previous backup;
- obtaining, by the electronic device, a synchronization type of differential files in the directory file based on the first file list and the second file list, wherein the synchronization type comprises added or modified, wherein in a case that the file type comprises a large file type, the differential files comprise a modified large file and an added large file, wherein the modified large file is a large file whose synchronization type is modified, and wherein the added large file is a large file whose synchronization type is added;
- and
- sending, by the electronic device, the differential files to a cloud server.
Dependencies are inferred from the claim text.