CN106021026A - Backup method and device - Google Patents

Backup method and device Download PDF

Info

Publication number
CN106021026A
CN106021026A CN201610351846.9A CN201610351846A CN106021026A CN 106021026 A CN106021026 A CN 106021026A CN 201610351846 A CN201610351846 A CN 201610351846A CN 106021026 A CN106021026 A CN 106021026A
Authority
CN
China
Prior art keywords
backup
task
backed
candidate
remaining space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610351846.9A
Other languages
Chinese (zh)
Other versions
CN106021026B (en
Inventor
成浩
周后取
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201610351846.9A priority Critical patent/CN106021026B/en
Publication of CN106021026A publication Critical patent/CN106021026A/en
Application granted granted Critical
Publication of CN106021026B publication Critical patent/CN106021026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a backup method and device. The method comprises following steps: determining the target space size which tasks to be backed up occupy when recording backup is needed; obtaining a candidate backup management server BM with remaining backup capability and remaining space larger than or equal to the target space size; determining the level of tasks to be backed up according to the target space size if the number of candidate BMs is larger than 0; and determining a target BM for backup according to the level of tasks to be backed up and remaining space sizes of all candidate BMs and assigning tasks to be backed up to the target BM and performing backup operation by the target BM.By applying the embodiment, the backup method and device have following beneficial effects: BM backup capacity and resources utilization effect in backup space can be improved during recording backup.

Description

A kind of backup method and device
Technical field
The present invention relates to technical field of memory, particularly relate to a kind of backup method and device.
Background technology
In the Video Surveillance Industry such as public security, garden is applied, to original video recording, there is following video recording standby Part demand: the video recording of some the material time sections selected for user is (such as: public security important case relates to The video recording of video camera relevant time period), need to perform backup.That is: by this part Video data from original Memory space, transmits and stores the memory space being exclusively used in backup, thus effectively prevent and deposit because of original Storage resource-constrained causes the appearance of the situations such as capped, the record loss of video recording.
Before performing video recording backup, it is necessary first to divide and back up the storage resource used to BM (Backup Management, archive management server), for BM storage backup video recording.Large-scale monitoring is deposited Storage office point, needs the number of cameras performing video recording backup a lot, therefore it is generally required to dispose multiple stage BM Perform video recording backup.
In the case of system exists multiple stage BM, how the backup tasks of multiple video cameras is distributed to BM Execution becomes a problem demanding prompt solution.
Summary of the invention
The present invention provides a kind of backup method and device, during to optimize video recording backup the backup capabilities of BM with And the using effect of backup space.
According to the first aspect of the invention, it is provided that a kind of backup method, including:
When needs carry out video recording backup, determine that task to be backed up needs the object space size taken;
Obtain and have residue backup capabilities and remaining space standby more than or equal to the candidate of described object space size Part management server B M;
If the quantity of described candidate BM is more than 0, then according to described object space size determine described in treat standby The rank of part task;
Rank according to described task to be backed up and the remaining space size of each candidate BM, determine for Perform target BM of backup;
Described task to be backed up is distributed to described target BM, described target BM performs backup.
According to the second aspect of the invention, it is provided that a kind of back-up device, including:
First determines unit, for when needs carry out video recording backup, determines that task to be backed up needs to take Object space size;
Acquiring unit, has residue backup capabilities and remaining space more than or equal to described target empty for acquisition Between size candidate backup management server B M;
Second determines unit, if the quantity of described candidate BM is more than 0, then big according to described object space The little rank determining described task to be backed up;
3rd determines unit, for the rank according to described task to be backed up and the residue of each candidate BM Space size, determines target BM for performing backup;
Allocation unit, for distributing to described target BM by described task to be backed up, by described target BM Perform backup.
Apply technical scheme disclosed by the invention, by carrying out video recording backup at needs, and system exists There are residue backup capabilities, and the object space size that remaining space takies more than or equal to task to be backed up needs Candidate BM time, determine the rank of task to be backed up according to object space size, and according to be backed up The rank of business and the remaining space size of each candidate BM determine target BM for performing backup, hold concurrently Turn round and look at residue backup capabilities and the remaining space of each BM, BM backup capabilities and standby when optimizing video recording backup The using effect of the resources such as part space.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of backup method that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the another kind of backup method that the embodiment of the present invention provides;
Fig. 3 is the structural representation of a kind of back-up device that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the another kind of back-up device that the embodiment of the present invention provides;
Fig. 5 is the structural representation of the another kind of back-up device that the embodiment of the present invention provides;
Fig. 6 is the structural representation of the another kind of back-up device that the embodiment of the present invention provides.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the embodiment of the present invention, and make The above-mentioned purpose of the embodiment of the present invention, feature and advantage can become apparent from understandable, the most right In the embodiment of the present invention, technical scheme is described in further detail.
Refer to the schematic flow sheet of a kind of backup method that Fig. 1, Fig. 1 provide for the embodiment of the present invention, As it is shown in figure 1, this backup method may include that
It should be noted that the executive agent of step 101~step 105 can be the management joint of BM cluster Processor in point or BM cluster management node, such as CPU, (Center Process Unit, central authorities process Unit), for ease of describing, below as a example by the executive agent of step 101~step 105 is for management node Illustrate.
Step 101, when needs carry out video recording backup, determine that task to be backed up needs the target empty that takies Between size.
In the embodiment of the present invention, when managing node and receiving video backup task, management node can be first Determine that task to be backed up needs space size (size of task the most to be backed up, referred to herein as mesh taken Mark space size).
In the embodiment of the present invention, task to be backed up needs the object space size taken can be entered by needs The video recording code check of the video camera of row backup and the backup duration of backup tasks determine.
Such as, task to be backed up needs the object space size taken can be determined by below equation:
Object space size=video camera video recording code check * backs up duration
Wherein, video camera video recording code check is the video recording code check of the video camera that needs carry out backing up, and backs up duration For the backup duration of task to be backed up, (this backup duration can be directly according to the initial time of task to be backed up Determine with the end time).
In the embodiment of the present invention, it is contemplated that system can exist some and cannot inquire video recording from data base The video camera of code check, the video camera pushed such as foreign lands, thus, management node can be according to by with lower section Formula determines the video recording code check of video camera:
Use the size of the backup file that video camera is up-to-date, complete backup, divided by this backup file Backup duration, is calculated the video recording code check of this video camera.
What deserves to be explained is, in embodiments of the present invention, for the video camera of newly configured backup, due to it There is not the backup file completing backup, therefore, for first backup tasks of this video camera, can Using by the average bit rate of the video camera of known video recording code check each in system as the video recording code check of this video camera, And after this video camera completes first backup tasks, according to the size and the backup that are actually backed up task Duration updates corresponding video recording code check.
For example, management node can increase an overall Hash table, all need in maintenance system Perform the code check (each video camera builds a Hash node) of the video camera of backup.Wherein, this overall situation Can also the average bit rate of all video cameras, total bitrate and total quantity etc. in maintenance system in Hash table.
Backup startup stage, management node can be inquired about from data base and be there is a need to perform taking the photograph of backup Camera, video camera processes the most one by one:
A, from backup file information table, encode based on video camera, inquire that this video camera is up-to-date one Backup file, returns the information such as its file size, video recording initial time, video recording end time;
If b inquires record:
Deduct video recording initial time with the video recording end time, obtain the backup duration of correspondence;
Use the size of backup file divided by backup duration, obtain the code check of this video camera;
Build a new Hash node, record the coding of video camera, code check, and this Hash node is inserted Enter Hash table (being encoded to key assignments with video camera);
Update the total bitrate (code check of cumulative current camera) of all video cameras, total quantity (video camera number Amount adds 1) and average bit rate.
If c does not inquires record:
Using average bit rate as the video recording code check of this video camera, and when first backup tasks of this video camera After completing, size and backup duration according to being actually backed up task update corresponding video recording code check.
Based on above-mentioned overall situation Hash table, when managing node and needing the video recording code check obtaining certain video camera, pipe Reason node can be according to video camera coded query overall situation Hash table, if inquiring the Hash node of correspondence, then The video recording code check wherein recorded is defined as the video recording code check of this video camera;If not inquiring the Hash of correspondence Node, then using average bit rate as the video recording code check of this video camera, and when first backup of this video camera After task completes, size and backup duration according to being actually backed up task update corresponding video recording code check, And in overall situation Hash table, increase the Hash node of correspondence.
After the video recording code check that management node gets video camera, can according to the video recording code check of video camera with And the backup duration calculation of task to be backed up obtains the object space size that task to be backed up needs to take.
Wherein, for first backup tasks of video camera, can directly use average bit rate and average Backup duration (can be empirical value, such as 1800 seconds, 3600 seconds etc.) is calculated.
Step 102, acquisition have residue backup capabilities and remaining space more than or equal to object space size BM list.
In the embodiment of the present invention, management node determine task to be backed up need the object space size that takies it After, management node can be to have residue backup capabilities and remaining space more than or equal to target empty in inquiry system Between the BM (referred to herein as candidate BM) of size.
Wherein, management node can record in the form of a list by inquire have residue backup capabilities and Remaining space is more than or equal to the BM of object space size.
If the quantity of step 103 candidate BM is more than 0, then determine to be backed up according to object space size The rank of task.
In the embodiment of the present invention, when the quantity managing the candidate BM that node gets is not 0 (BM row Table is not empty), system i.e. there are residue backup capabilities and remaining space big more than or equal to object space During little BM, management node can need the object space size taken determine according to task to be backed up to treat The rank of backup tasks.
In the embodiment of the present invention, it is contemplated that if need to carry out backup tasks, all directly backup is appointed every time Business is distributed to remain backup capabilities and the BM of remaining space maximum, may result in needs and takies sky Between less backup tasks the backup capabilities of BM big for remaining space is taken, and then management node need When backing up the bigger backup tasks that takes up room, the enough BM of remaining space does not possess backup energy Power, and possess backup capabilities, remaining space is not enough, thus causes backup tasks to issue failure.
As an example it is assumed that system there is the BM of residue backup capabilities include BM1, BM2 and BM3, Wherein, the residue backup space that residue backup space is 1.5G, BM of BM1 is the surplus of 1G, BM3 Remaining backup space is 200M, and the residue backup capabilities of BM1, BM2 and BM3 is all only capable of supporting 1 tunnel record As backup;Assume that certain moment, management node successively detect that IPC1, IPC2 and IPC3 need to record As backup, task to be backed up needs the space size taken to be 100M (IPC1), 200M (IPC2) successively With 1G (IPC3), the backup tasks of IPC1 first can be distributed to the backup of BM1, IPC2 by management node Task distributes to BM2, and for the backup tasks of IPC3, owing to the remaining space of BM3 is not enough, then Failure can be issued.
Thus, in embodiments of the present invention, management node is that task choosing to be backed up is for performing backup During target BM, no longer in strict accordance with selection, there is residue backup capabilities and the BM of remaining space maximum Principle select, but first can determine the rank of task to be backed up according to object space size, enter And be that task choosing to be backed up is for performing target BM of backup according to the rank of this task to be backed up.
As the optional embodiment of one, in embodiments of the present invention, determine according to object space size The rank of task to be backed up, may include that
When object space size is more than or equal to first ratio of mean size of backup tasks, determine treat standby The rank of part task is first level;Wherein, the first ratio is more than 100%;
When object space size is less than or equal to second ratio of mean size of backup tasks, determine treat standby The rank of part task is second level;Wherein, the second ratio is less than 100%;
When object space size is less than the first ratio of the mean size of backup tasks, and more than backup tasks The second ratio of mean size time, determine that the rank of task to be backed up is third level.
In this embodiment, in order to determine the rank of task to be backed up, management node can first determine and is The mean size of the middle backup tasks of system.
Wherein, in system, the mean size of backup tasks can be determined by below equation:
The mean size of backup tasks=average bit rate * averagely backs up duration
Wherein, the average bit rate of average bit rate all video cameras in being system (determines that mode may refer to step Associated description in rapid 101), a length of empirical value during average backup, can be by manager according to concrete scene Set, such as 1800 seconds, 3600 seconds etc..
In this embodiment, management node determines in system after the mean size of backup tasks, permissible The space size (or referred to as backup tasks size) taken by needs is more than or equal to the average big of backup tasks The rank of the task to be backed up of the first little ratio is defined as first level;Need the space size taken little Rank in the task to be backed up of the second ratio equal to the mean size of backup tasks is defined as the second level Not;The space size that needs take is less than the first ratio of the mean size of backup tasks, and is more than backup The rank of the task to be backed up of the second ratio of the mean size of task is defined as third level.
As an example it is assumed that the first ratio is 125%, the second ratio is 75%, and management node can be by According in the following manner backup tasks carried out partition of the level:
First level (high size (size)): backup tasks size >=average bit rate * averagely backs up duration * 125%;
Second level (low size): backup tasks size≤average bit rate * averagely backs up duration * 75%;
Third level (middle size): backup tasks size is between above-mentioned two value.
What deserves to be explained is, in this embodiment, for first backup tasks of arbitrary video camera, The rank of this backup tasks can be defined as third level.
It should be appreciated that the dividing mode of the rank of above-mentioned task to be backed up is only in the embodiment of the present invention In a kind of instantiation rather than limiting the scope of the present invention, the i.e. embodiment of the present invention, it is possible to To realize treating the division of the rank of backup tasks otherwise, the rank such as task to be backed up is permissible Only it is divided into two ranks, is first level more than or equal to the backup tasks of the mean size of backup tasks, It is second level less than the backup tasks of the mean size of backup tasks;Or, the rank of task to be backed up Can also be divided into four or more rank, it is embodied in this and does not repeats.
For ease of understanding, in the embodiment of the present invention, it is described as a example by the partition of the level in above-mentioned example.
Step 104, according to the rank of task to be backed up and the remaining space size of each candidate BM, really Fixed target BM for performing backup.
In the embodiment of the present invention, after management node determines the rank of task to be backed up, can treat according to this The rank of backup tasks and the remaining space size of each candidate BM, determine the target for performing backup BM。
As a kind of optional embodiment, in embodiments of the present invention, according to the rank of task to be backed up with And the remaining space size of each candidate BM, determine target BM for performing backup, may include that
When the rank of task to be backed up is first level, remaining space in candidate BM is put down more than system The candidate BM of all remaining spaces, and remaining space maximum is defined as target BM;
When the rank of task to be backed up is second level, remaining space in candidate BM is put down less than system The candidate BM of all remaining spaces, and remaining space maximum is defined as target BM;
When the rank of task to be backed up is third level, the candidate maximum by remaining space in candidate BM BM is defined as target BM.
In this embodiment, management node can be according to the remaining space of each candidate BM to candidate BM Carry out partition of the level.
Such as, remaining space can be divided into the more than the BM in system average residual space by management node One-level other candidate BM, remaining space is divided into second level less than the BM in system average residual space Candidate BM.
Wherein, system average residual space can be all online BM of system remaining space sum be Unite the ratio of quantity of all online BM.
In the embodiment of the present invention, online BM refers to that in running order BM, management node can lead to Cross the monitoring to BM presence of the heart beating keep-alive message between BM.
In this embodiment, for the task to be backed up of first level, management node can be by the first order The candidate BM that in other candidate BM, remaining space is maximum is defined as target BM;For second level Task to be backed up, management node can be by candidate BM maximum for remaining space in the candidate BM of second level It is defined as target BM;For the task to be backed up of third level, management node can be by candidate BM The maximum candidate BM of remaining space is defined as target BM, such that it is able to be effectively prevented from needing taking The problem of the backup capabilities of the BM that the less task preemption remaining space to be backed up in space is bigger, optimizes BM residue backup capabilities and the distribution of remaining space.
What deserves to be explained is, in embodiments of the present invention, when it needs to be determined that the task to be backed up of first level Target BM, but (i.e. candidate BM remaining space is respectively less than to there is not the candidate BM of first level System average residual space) or when it needs to be determined that target BM of task to be backed up of second level, but do not deposit At the candidate BM (i.e. candidate BM remaining space is all higher than system average residual space) of second level, then Task to be backed up, it is believed that BM selects unsuccessfully, is not first handed down to BM by management node, waits certain The most again target BM is determined according to above-mentioned steps after time.
It should be appreciated that the partition of the level mode of above-mentioned candidate BM is only the one in the embodiment of the present invention In instantiation rather than limiting the scope of the present invention, the i.e. embodiment of the present invention, it is also possible to press Realize the division of the rank to candidate BM according to alternate manner, the rank such as task to be backed up can only divide For three or more ranks, it is embodied in this and does not repeats.
Step 105, task to be backed up is distributed to target BM, target BM perform backup.
In the embodiment of the present invention, after management node determines target BM, management node can will be treated Backup tasks distributes to target BM, target BM perform backup;Wherein, target BM performs backup Implement the associated description that may refer in existing related procedure, the embodiment of the present invention is not done superfluous at this State.
Visible, in the method flow shown in Fig. 1, by system there are residue backup capabilities and When remaining space is more than or equal to the candidate BM of object space size, take according to task to be backed up needs Object space size determines the rank of task to be backed up, and according to the rank of task to be backed up and each candidate The remaining space size of BM, determines target BM for performing backup, owing to performing backup in selection BM time, take into account residue backup capabilities and the remaining space of each BM, the BM that remaining space is big is preferential Backup needs the backup tasks that the space that takies is big, efficiently avoid less standby in the space needing to take The backup capabilities of the BM that part task preemption remaining space is bigger, when optimizing video recording backup, BM backs up energy The using effect of the resource such as power and backup space.
Refer to the schematic flow sheet of the another kind of backup method that Fig. 2, Fig. 2 provide for the embodiment of the present invention, As in figure 2 it is shown, this backup method may comprise steps of:
Step 201, when needs carry out video recording backup, determine that task to be backed up needs the target empty that takies Between size.
Step 202, acquisition have residue backup capabilities and remaining space more than or equal to object space size Candidate BM.If the quantity of candidate BM is more than 0, then go to step 203;If the quantity of candidate BM is 0, then go to step 208.
In the embodiment of the present invention, the implementing of step 201~step 202 may refer to above-mentioned steps 101~ Associated description in step 102, does not repeats them here.
Step 203, judge that whether BM remaining space well-balanced adjustment function is for enabling state.The most then Go to step 204;Otherwise, step 207 is gone to.
In the embodiment of the present invention, it is contemplated that the remaining space between online BM each in system more equalizes Time, can consider whether the residue backup capabilities of the BM that remaining space is bigger can be required and take The backup tasks that space is less, thus, in order to improve backup efficiency in this case, permissible in system Newly-increased BM remaining space well-balanced adjustment function, when this BM remaining space well-balanced adjustment function is for enabling shape During state, management node can back up according to the method shown in Fig. 1;When this BM remaining space equalizes When regulatory function is closed mode, management node can be directly according to the remaining space size of each candidate BM Determine target BM.
Correspondingly, in embodiments of the present invention, when system there are residue backup capabilities and residue sky Between more than or equal to the candidate BM of object space size time, management node can determine whether that BM remains Whether compartment equalization regulatory function is for enabling state.If so, step 204 is performed;Otherwise, 207 are performed.
As the optional embodiment of one, enabling and closing of BM remaining space well-balanced adjustment function can To be determined by the following manner:
When BM remaining space well-balanced adjustment function is for closing, and in system the remaining space of online BM is not Balanced intensity meet first pre-conditioned time, by BM remaining space well-balanced adjustment function setting for enabling shape State;
When BM remaining space well-balanced adjustment function is empty for the residue enabling online BM in state, and system Between inequality extent meet second pre-conditioned time, by BM remaining space well-balanced adjustment function setting for close Closed state.
In this embodiment, management node can be according to current BM remaining space well-balanced adjustment function The remaining space inequality extent of online BM in state (enable or close) and system, it is determined whether Need to adjust the state of BM remaining space well-balanced adjustment function.
When the remaining space inequality extent of BM online in system meet first pre-conditioned time, management joint Point is it is believed that need to enable BM remaining space well-balanced adjustment function, now, if BM remaining space is equal Weighing apparatus regulatory function is closed mode, then management node can be adjusted to enable state;If BM remains Compartment equalization regulatory function is for enabling state, then management node can keep it for enabling state.
When the remaining space inequality extent of BM online in system meet second pre-conditioned time, management joint Point is it is believed that need to close BM remaining space well-balanced adjustment function, now, if BM remaining space is equal Weighing apparatus regulatory function is starting state, then management node can be adjusted to closed mode;If BM remains Compartment equalization regulatory function is closed mode, then management node can keep it to be closed mode.
Wherein, in system, the remaining space inequality extent of online BM meets first and pre-conditioned can wrap Include but be not limited to the remaining space of the maximum online BM of remaining space in system minimum with remaining space The difference of the remaining space of line BM or ratio are more than or equal to first threshold etc..
In system the remaining space inequality extent of online BM meet second pre-conditioned can include but not It is limited to the online BM that in system, the remaining space of the online BM that remaining space is maximum is minimum with remaining space The difference of remaining space or ratio less than or equal to Second Threshold etc..Wherein, first threshold is more than the second threshold Value.
Such as, management node can the remaining space of online BM in systems when meeting following condition, recognize First is met pre-conditioned for the remaining space inequality extent of BM online in system:
The residue of the online BM that the remaining space of the online BM that remaining space is maximum-remaining space is minimum is empty Between >=3* backup tasks needs the maximum space that takies
Wherein, backup tasks needs the maximum space taken can be empirical value, can be by user according to tool Body scene settings, as this backup tasks needs the maximum space taken can be 1.5G, now first threshold For 4.5G.
Additionally, management node can the remaining space of online BM in systems when meeting following condition, recognize Second is met pre-conditioned for the remaining space inequality extent of BM online in system:
The residue of the online BM that the remaining space of the online BM that remaining space is maximum-remaining space is minimum is empty Between≤1* backup tasks needs the maximum space that takies
Wherein, when this backup tasks needs the maximum space taken can be 1.5G, and Second Threshold is 1.5G.
Step 204, determine the rank of task to be backed up according to object space size.
Step 205, according to the rank of task to be backed up and the remaining space size of each candidate BM, really Fixed target BM for performing backup.
Step 206, task to be backed up is distributed to target BM.Backup is performed by target BM.
In the embodiment of the present invention, the implementing of step 204~step 206 may refer to above-mentioned steps 103~ Associated description in step 105, does not repeats them here.
Step 207, candidate BM maximum for remaining space in candidate BM is defined as target BM, and Task to be backed up is distributed to this target BM, this target BM performs backup.
In the embodiment of the present invention, if management node determines that BM remaining space well-balanced adjustment function is for closing shape In state, i.e. system, the remaining space of online BM more equalizes, it may not be necessary to go to consider what needs took Whether the less backup tasks in space can seize the backup capabilities of the bigger BM of remaining space, then manage joint The candidate BM that remaining space in candidate BM is maximum directly can be defined as target BM by point, and will treat Backup tasks distributes to this target BM, this target BM perform backup.
Step 208, judge whether system exists online more than or equal to object space size of remaining space BM.If so, step 209 is gone to;Otherwise, full overlapping operation is performed.
In the embodiment of the present invention, system not there are residue backup capabilities when management node determines and remain When complementary space needs, more than or equal to task to be backed up, the object space size taken, management node can enter one Step judges that whether there is remaining space in system (does not i.e. have more than or equal to the online BM of object space size Residue backup capabilities, but remaining space is more than or equal to the online BM of object space size).
If system existing remaining space more than or equal to object space size (but not remaining backup capabilities) Online BM, then can perform step 209;Otherwise, full overlapping operation is performed.
Wherein, full the implementing of overlapping operation of management node execution may refer in existing related procedure Related realization, the embodiment of the present invention does not repeats at this.
Step 209, judge whether system there are the online BM of residue backup capabilities.If so, turn To step 210;Otherwise, it determines select BM failure.
Step 210, the global variable being used for adding up the quantity that overall situation task is piled up is added 1, and judge the overall situation Whether task heap product amount exceedes predetermined threshold value.If so, full overlapping operation is performed;Otherwise, it determines select BM failure.
In the embodiment of the present invention, (but do not have more than or equal to object space size when system exists remaining space Have surplus capacity) online BM time, whether management node can determine whether to there are in system surplus The online BM of remaining backup capabilities (i.e. have residue backup capabilities, but remaining space is less than object space size); If existing, then management node can by this using task to be backed up as piling up task, and will be used for adding up complete The global variable of office's task heap product amount adds 1, and judges whether overall situation task heap product amount exceedes threshold value; If exceeding threshold value, then perform full overlapping operation;Otherwise, management node may determine that selection BM failure, This not dispatching down distributing of this backup tasks.
Wherein, when management node determines selection BM failure, backup tasks this when not issuing, management joint Point can select BM for this backup tasks the most again.
Visible, in the method flow shown in Fig. 2, management node can equalize according to BM remaining space The different conditions of regulatory function, in a different manner for task choosing to be backed up for performing the target of backup BM, improves the motility of backup.
By above description it can be seen that the embodiment of the present invention provide technical scheme in, by need Carry out video recording backup, and system there are residue backup capabilities, and remaining space is standby more than or equal to treating During the candidate BM of the object space size that part task needs to take, determine according to object space size treat standby The rank of part task, and true according to the rank of task to be backed up and the remaining space size of each candidate BM Fixed target BM for performing backup, takes into account residue backup capabilities and the remaining space of each BM, optimizes The using effect of the resource such as BM backup capabilities and backup space during video recording backup.
Referring to Fig. 3, the structural representation of a kind of back-up device provided for the embodiment of the present invention, such as Fig. 3 Shown in, this back-up device may include that
First determines unit 310, for when needs carry out video recording backup, determining task needs to be backed up The object space size taken;
Acquiring unit 320, has residue backup capabilities and remaining space more than or equal to described mesh for acquisition Candidate backup management server B M of mark space size;
Second determines unit 330, if the quantity of described candidate BM is more than 0, then according to described target empty Between size determine the rank of described task to be backed up;
3rd determines unit 340, for according to the rank of described task to be backed up and each candidate BM Remaining space size, determines target BM for performing backup;
Allocation unit 350, for distributing to described target BM by described task to be backed up, by described mesh Mark BM performs backup.
In an alternative embodiment, described second determines unit 330, can be specifically for when described target empty Between size more than or equal to first ratio of mean size of backup tasks time, determine described task to be backed up Rank is first level;Wherein, the first ratio is more than 100%;When described object space size is less than When the second ratio of the mean size of backup tasks, determine that the rank of described task to be backed up is the second level Not;Wherein, the second ratio is less than 100%;When described object space size is less than the average of backup tasks First ratio of size, and during more than the second ratio of the mean size of backup tasks, determine to be backed up The rank of business is third level.
In an alternative embodiment, the described 3rd determines unit 340, can be specifically for when described to be backed up When the rank of task is first level, remaining space in described candidate BM is empty more than system average residual Between, and the maximum candidate BM of remaining space is defined as target BM;Rank when described task to be backed up During for second level, by remaining space in described candidate BM less than system average residual space, and residue The candidate BM of space maximum is defined as target BM;When the rank of described task to be backed up is third level Time, the candidate BM that remaining space in described candidate BM is maximum is defined as target BM.
See also Fig. 4, the structural representation of another kind of back-up device provided for the embodiment of the present invention, On the basis of embodiment illustrated in fig. 3, the back-up device shown in Fig. 4 can also include:
First judging unit 360, if the quantity for described candidate BM is more than 0, then judges that BM remains Whether complementary space well-balanced adjustment function is for enabling state;
Correspondingly, described second determines unit 330, can be specifically for when described first judging unit 360 When being judged as YES, determine the rank of described task to be backed up according to described object space size;
Described 3rd determines unit 340, it is also possible to for being judged as NO when described first judging unit 360 Time, the candidate BM that remaining space in described candidate BM is maximum is defined as target BM;
Described allocation unit 350, it is also possible to for described task to be backed up is distributed to this target BM, Backup is performed by this target BM.
See also Fig. 5, the structural representation of another kind of back-up device provided for the embodiment of the present invention, On the basis of embodiment illustrated in fig. 4, the back-up device shown in Fig. 5 can also include:
Unit 370 is set, may be used for when BM remaining space well-balanced adjustment function is closed mode, and In system the remaining space inequality extent of online BM meet first pre-conditioned time, by BM residue sky Between well-balanced adjustment function setting for enabling state;When BM remaining space well-balanced adjustment function is for enabling state, And in system the remaining space inequality extent of online BM meet second pre-conditioned time, by BM remain Compartment equalization regulatory function is set to off closed state.
See also Fig. 6, the structural representation of another kind of back-up device provided for the embodiment of the present invention, On the basis of embodiment illustrated in fig. 3, the back-up device shown in Fig. 6 can also include:
Second judging unit 380, if the quantity for described candidate BM is to be in 0, then judgement system The no remaining space that exists is more than or equal to the online BM of described object space size;
Processing unit 390, if it is big more than or equal to described object space to there is not remaining space in system Little online BM, then perform full overlapping operation;
Described second judging unit 380, it is also possible to if there is remaining space in system more than or equal to institute State the online BM of object space size, then judge whether system there are the online of residue backup capabilities BM;
Described second judging unit 380, it is also possible to if there are in the system residue backup capabilities Line BM, then add 1 by the global variable being used for adding up overall situation task heap product amount, and judge overall situation task Pile up whether quantity exceedes predetermined threshold value;
Described processing unit 390, it is also possible to if exceeding predetermined threshold value, then for overall situation task heap product amount Perform full overlapping operation;Otherwise, it determines select BM failure;
Described processing unit 390, it is also possible to if not there are the online of residue backup capabilities in system BM, it is determined that select BM failure.
In said apparatus, the function of unit and the process that realizes of effect specifically refer in said method corresponding Step realize process, do not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part ginseng See that the part of embodiment of the method illustrates.Device embodiment described above is only schematically, The wherein said unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole module of person realizes the purpose of the present invention program.Those of ordinary skill in the art are not paying creativeness In the case of work, i.e. it is appreciated that and implements.
As seen from the above-described embodiment, by carrying out video recording backup at needs, and it is standby to there are residue in system Part ability, and remaining space needs the candidate of the object space size taken more than or equal to task to be backed up During BM, determine the rank of task to be backed up according to object space size, and according to the level of task to be backed up The remaining space size of other and each candidate BM determines target BM for performing backup, takes into account each BM Residue backup capabilities and remaining space, optimize video recording backup time BM backup capabilities and backup space etc. The using effect of resource.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to this Other embodiment of invention.The application is intended to any modification, purposes or the adaptability of the present invention Change, these modification, purposes or adaptations are followed the general principle of the present invention and include this Bright undocumented common knowledge in the art or conventional techniques means.Description and embodiments only by Being considered as exemplary, true scope and spirit of the invention are pointed out by claim below.
It should be appreciated that the invention is not limited in described above and illustrated in the accompanying drawings accurately Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present invention is only by institute Attached claim limits.

Claims (12)

1. a backup method, it is characterised in that including:
When needs carry out video recording backup, determine that task to be backed up needs the object space size taken;
Obtain and have residue backup capabilities and remaining space standby more than or equal to the candidate of described object space size Part management server B M;
If the quantity of described candidate BM is more than 0, then according to described object space size determine described in treat standby The rank of part task;
Rank according to described task to be backed up and the remaining space size of each candidate BM, determine for Perform target BM of backup;
Described task to be backed up is distributed to described target BM, described target BM performs backup.
Method the most according to claim 1, it is characterised in that described big according to described object space The little rank determining described task to be backed up, including:
When described object space size is more than or equal to the first ratio of the mean size of backup tasks, determine The rank of described task to be backed up is first level;Wherein, the first ratio is more than 100%;
When described object space size is less than or equal to the second ratio of the mean size of backup tasks, determine The rank of described task to be backed up is second level;Wherein, the second ratio is less than 100%;
When described object space size is less than the first ratio of the mean size of backup tasks, and more than backup During the second ratio of the mean size of task, determine that the rank of task to be backed up is third level.
Method the most according to claim 2, it is characterised in that described according to described task to be backed up Rank and the remaining space size of each candidate BM, determine for perform backup target BM, bag Include:
When the rank of described task to be backed up is first level, by big for remaining space in described candidate BM In system average residual space, and the candidate BM of remaining space maximum is defined as target BM;
When the rank of described task to be backed up is second level, by little for remaining space in described candidate BM In system average residual space, and the candidate BM of remaining space maximum is defined as target BM;
When the rank of described task to be backed up is third level, by remaining space in described candidate BM Big candidate BM is defined as target BM.
Method the most according to claim 1, it is characterised in that if the quantity of described candidate BM More than 0, before the most described rank determining described task to be backed up according to described object space size, also Including:
Judge that whether BM remaining space well-balanced adjustment function is for enabling state;
If, it is determined that perform the described level determining described task to be backed up according to described object space size Other step;
Otherwise, the candidate BM that remaining space in described candidate BM is maximum is defined as target BM, and Described task to be backed up is distributed to this target BM, this target BM performs backup.
Method the most according to claim 4, it is characterised in that described method also includes:
When the residue that BM remaining space well-balanced adjustment function is online BM in closed mode, and system is empty Between inequality extent meet first pre-conditioned time, by BM remaining space well-balanced adjustment function setting for opening Use state;
When BM remaining space well-balanced adjustment function is empty for the residue enabling online BM in state, and system Between inequality extent meet second pre-conditioned time, by BM remaining space well-balanced adjustment function setting for close Closed state.
Method the most according to claim 1, it is characterised in that described method also includes:
If the quantity of described candidate BM is 0, then judge that whether there is remaining space in system is more than or equal to The online BM of described object space size;
If system does not exist the remaining space online BM more than or equal to described object space size, then hold The full overlapping operation of row;
If system exists the remaining space online BM more than or equal to described object space size, then judge Whether system there are the online BM of residue backup capabilities;
If system there are the online BM of residue backup capabilities, then will be used for adding up overall situation task and pile up The global variable of quantity adds 1, and judges whether overall situation task heap product amount exceedes predetermined threshold value, if so, Then perform full overlapping operation;Otherwise, it determines select BM failure;
If system not there are the online BM of residue backup capabilities, it is determined that select BM failure.
7. a back-up device, it is characterised in that including:
First determines unit, for when needs carry out video recording backup, determines that task to be backed up needs to take Object space size;
Acquiring unit, has residue backup capabilities and remaining space more than or equal to described target empty for acquisition Between size candidate backup management server B M;
Second determines unit, if the quantity of described candidate BM is more than 0, then big according to described object space The little rank determining described task to be backed up;
3rd determines unit, for the rank according to described task to be backed up and the residue of each candidate BM Space size, determines target BM for performing backup;
Allocation unit, for distributing to described target BM by described task to be backed up, by described target BM Perform backup.
Device the most according to claim 7, it is characterised in that
Described second determines unit, specifically for when described object space size is more than or equal to backup tasks During the first ratio of mean size, determine that the rank of described task to be backed up is first level;Wherein, One ratio is more than 100%;When described object space size less than or equal to backup tasks mean size the During two ratios, determine that the rank of described task to be backed up is second level;Wherein, the second ratio is less than 100%;When described object space size is less than the first ratio of the mean size of backup tasks, and more than standby During the second ratio of the mean size of part task, determine that the rank of task to be backed up is third level.
Device the most according to claim 8, it is characterised in that
Described 3rd determines unit, specifically for when the rank of described task to be backed up is first level, By remaining space in described candidate BM more than system average residual space, and the candidate that remaining space is maximum BM is defined as target BM;When the rank of described task to be backed up is second level, by described candidate In BM, remaining space is less than system average residual space, and the candidate BM of remaining space maximum is defined as Target BM;When the rank of described task to be backed up is third level, will described candidate BM remain The candidate BM of space maximum is defined as target BM.
Device the most according to claim 7, it is characterised in that described device also includes:
First judging unit, if the quantity for described candidate BM is more than 0, then judges BM residue sky Between well-balanced adjustment function whether for enabling state;
Described second determines unit, specifically for when described first judging unit is judged as YES, according to institute State object space size and determine the rank of described task to be backed up;
Described 3rd determines unit, is additionally operable to when described first judging unit is judged as NO, by described time The candidate BM that in BM, remaining space is maximum is selected to be defined as target BM;
Described allocation unit, is additionally operable to described task to be backed up is distributed to this target BM, by this target BM performs backup.
11. devices according to claim 10, it is characterised in that described device also includes:
Unit is set, for when BM remaining space well-balanced adjustment function be in closed mode, and system The remaining space inequality extent of line BM meet first pre-conditioned time, by BM remaining space equilibrium adjust Joint function setting is for enabling state;When BM remaining space well-balanced adjustment function is for enabling state, and system In the remaining space inequality extent of online BM meet second pre-conditioned time, by equal for BM remaining space Weighing apparatus regulatory function is set to off closed state.
12. devices according to claim 7, it is characterised in that described device also includes:
Second judging unit, if the quantity for described candidate BM is 0, then judges whether deposit in system The online BM of described object space size it is more than or equal at remaining space;
, if there is not remaining space in system more than or equal to described object space size in processing unit Online BM, then perform full overlapping operation;
Described second judging unit, if being additionally operable in system there is remaining space more than or equal to described target empty Between the online BM of size, then judge whether system there are the online BM of residue backup capabilities;
Described second judging unit, if being additionally operable in system there are the online BM of residue backup capabilities, Then the global variable being used for adding up overall situation task heap product amount is added 1, and judge overall situation task heap product amount Whether exceed predetermined threshold value;
Described processing unit, if being additionally operable to overall situation task heap product amount to exceed predetermined threshold value, then performs completely to cover Lid operation;Otherwise, it determines select BM failure;
Described processing unit, if being additionally operable in system not there are the online BM of residue backup capabilities, then Determine selection BM failure.
CN201610351846.9A 2016-05-23 2016-05-23 Backup method and device Active CN106021026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610351846.9A CN106021026B (en) 2016-05-23 2016-05-23 Backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610351846.9A CN106021026B (en) 2016-05-23 2016-05-23 Backup method and device

Publications (2)

Publication Number Publication Date
CN106021026A true CN106021026A (en) 2016-10-12
CN106021026B CN106021026B (en) 2020-02-18

Family

ID=57094617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610351846.9A Active CN106021026B (en) 2016-05-23 2016-05-23 Backup method and device

Country Status (1)

Country Link
CN (1) CN106021026B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998436A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video recording backup method and device
CN109783275A (en) * 2018-12-17 2019-05-21 北京春鸿科技有限公司 The method and terminal of file backup are carried out to multiple wifi storage equipment
CN111930566A (en) * 2020-07-28 2020-11-13 友谊时光科技股份有限公司 Data backup method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092527A (en) * 2011-10-31 2013-05-08 深圳市快播科技有限公司 Storage method and storage system for small files
CN103268290A (en) * 2013-01-04 2013-08-28 苏州懿源宏达知识产权代理有限公司 Priority-locking-based flash memory storage method
CN105045725A (en) * 2015-08-04 2015-11-11 Tcl移动通信科技(宁波)有限公司 Multi-storage-card storage realization method and system for mobile terminal
CN105245912A (en) * 2015-10-21 2016-01-13 东方网力科技股份有限公司 Methods and devices for caching video data and reading video data
US20160019115A1 (en) * 2007-04-27 2016-01-21 Gary Stephen Shuster Flexible data storage system
CN105592123A (en) * 2014-11-12 2016-05-18 富泰华工业(深圳)有限公司 Storage management system, management apparatus and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160019115A1 (en) * 2007-04-27 2016-01-21 Gary Stephen Shuster Flexible data storage system
CN103092527A (en) * 2011-10-31 2013-05-08 深圳市快播科技有限公司 Storage method and storage system for small files
CN103268290A (en) * 2013-01-04 2013-08-28 苏州懿源宏达知识产权代理有限公司 Priority-locking-based flash memory storage method
CN105592123A (en) * 2014-11-12 2016-05-18 富泰华工业(深圳)有限公司 Storage management system, management apparatus and method
CN105045725A (en) * 2015-08-04 2015-11-11 Tcl移动通信科技(宁波)有限公司 Multi-storage-card storage realization method and system for mobile terminal
CN105245912A (en) * 2015-10-21 2016-01-13 东方网力科技股份有限公司 Methods and devices for caching video data and reading video data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998436A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video recording backup method and device
CN106998436B (en) * 2017-03-24 2020-09-01 浙江宇视科技有限公司 Video backup method and device
CN109783275A (en) * 2018-12-17 2019-05-21 北京春鸿科技有限公司 The method and terminal of file backup are carried out to multiple wifi storage equipment
CN111930566A (en) * 2020-07-28 2020-11-13 友谊时光科技股份有限公司 Data backup method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106021026B (en) 2020-02-18

Similar Documents

Publication Publication Date Title
CN110515704B (en) Resource scheduling method and device based on Kubernetes system
US9354937B2 (en) System and method for electronic work prediction and dynamically adjusting server resources
CN110287029A (en) A method of it is adjusted based on kubernetes container resource dynamic
CN110297711A (en) Batch data processing method, device, computer equipment and storage medium
CN105049268A (en) Distributed computing resource allocation system and task processing method
CN108632365A (en) Service Source method of adjustment, relevant apparatus and equipment
CN106021026A (en) Backup method and device
CN110825520A (en) Cluster top-speed elastic expansion method for realizing efficient resource utilization
CA2545507A1 (en) Apparatus, system, and method for on-demand control of grid system resources
CN105677441B (en) Virtual machine migration method, virtual facility manager and coordinator
CN106547612A (en) A kind of multi-task processing method and device
CN106502918B (en) A kind of scheduling memory method and device
CN111274033B (en) Resource deployment method, device, server and storage medium
CN111722928A (en) Resource scheduling method and device, electronic equipment and storage medium
CN104158841A (en) Computing resource allocation method
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
CN105407162A (en) Cloud computing Web application resource load balancing algorithm based on SLA service grade
CN106708608A (en) Distributed lock service method and acquisition method, and corresponding device
CN109871273A (en) A kind of adaptive task moving method and device
CN110795217A (en) Task allocation method and system based on resource management platform
CN110011843A (en) Alarm information processing method, electronic equipment and storage medium
CN112019577B (en) Exclusive cloud storage implementation method and device, computing equipment and computer storage medium
CN116991949B (en) Data synchronization method, device, equipment, server and readable storage medium
CN109284190A (en) A kind of task processing method and device
CN111667264B (en) Block data transmission method and device, electronic equipment and nonvolatile computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant