CN111597144A - File migration method, device and equipment - Google Patents

File migration method, device and equipment Download PDF

Info

Publication number
CN111597144A
CN111597144A CN202010425291.4A CN202010425291A CN111597144A CN 111597144 A CN111597144 A CN 111597144A CN 202010425291 A CN202010425291 A CN 202010425291A CN 111597144 A CN111597144 A CN 111597144A
Authority
CN
China
Prior art keywords
file
content management
management system
hierarchical structure
enterprise content
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
CN202010425291.4A
Other languages
Chinese (zh)
Other versions
CN111597144B (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.)
Shanghai Hongyi Software Technology Co ltd
Original Assignee
Shanghai Hongyi Software Technology 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 Shanghai Hongyi Software Technology Co ltd filed Critical Shanghai Hongyi Software Technology Co ltd
Priority to CN202010425291.4A priority Critical patent/CN111597144B/en
Publication of CN111597144A publication Critical patent/CN111597144A/en
Application granted granted Critical
Publication of CN111597144B publication Critical patent/CN111597144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture

Abstract

The application discloses a file migration method, which comprises the following steps: according to the migration instruction, mounting the directory of the NAS file system to the current server; caching the hierarchical structure of the directory by utilizing a quick import tool of the enterprise content management system; inserting the hierarchical structure into a database of an enterprise content management system; and synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system by using the import synchronization service according to the hierarchical structure in the database. Therefore, the method realizes the file migration process by using the rapid import tool and the import synchronization service, and migrates the file from the NAS file system to the enterprise content management system. In addition, the application also provides a file migration device, equipment and a readable storage medium, and the technical effect of the file migration device corresponds to that of the method.

Description

File migration method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a file migration method, apparatus, device, and readable storage medium.
Background
Before using an enterprise content management system, many enterprises use NAS file systems to manage files, and the amount of data for managing content is often very large. When these files need to be migrated from the NAS file system to the content management system, a lot of human intervention is required and time is long.
Therefore, how to provide a scheme for migrating a file from a NAS file system to a content management system, avoid human intervention, and improve migration efficiency is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a file migration method, a file migration device, a file migration apparatus and a readable storage medium, which are used for solving the problems that the existing file migration scheme needs human intervention and is long in time consumption. The specific scheme is as follows:
in a first aspect, the present application provides a file migration method, including:
according to the migration instruction, mounting the directory of the NAS file system to the current server;
caching the hierarchical structure of the directory by utilizing a quick import tool of the enterprise content management system;
inserting the hierarchical structure into a database of an enterprise content management system;
and synchronizing the file entity of the NAS file system to the object storage equipment of the enterprise content management system according to the hierarchical structure in the database by using the import synchronization service of the enterprise content management system.
Preferably, the inserting the hierarchical structure into a database of an enterprise content management system includes:
and inserting the hierarchical structure into a database of the enterprise content management system by using a method of inserting SQL in batches.
Preferably, the mounting the directory of the NAS file system to the current server includes:
and mounting the directory of the NAS file system to the current server through a CIFS protocol.
Preferably, after the synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system according to the hierarchical structure in the database, the method further includes:
and after the file synchronization is finished, unloading the directory of the NAS file system from the current server.
Preferably, the caching the hierarchical structure of the directory by using a fast import tool of the enterprise content management system includes:
and caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list, and caching the hierarchical structure of the filtered directory.
In a second aspect, the present application provides a file migration apparatus, including:
mounting a module: the server is used for mounting the directory of the NAS file system to the current server according to the migration instruction;
a cache module: the system comprises a cache module, a cache module and a cache module, wherein the cache module is used for caching a hierarchical structure of the directory by utilizing a quick import tool of an enterprise content management system;
inserting a module: for inserting the hierarchical structure into a database of an enterprise content management system;
a file synchronization module: and the file entity synchronization module is used for synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system according to the hierarchical structure in the database by utilizing the import synchronization service of the enterprise content management system.
Preferably, the cache module is configured to:
and caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list, and caching the hierarchical structure of the filtered directory.
In a third aspect, the present application provides a file migration apparatus, including:
a memory: for storing a computer program;
a processor: for executing said computer program for implementing the steps of the file migration method as described above.
In a fourth aspect, the present application provides a readable storage medium having stored thereon a computer program for implementing the steps of the file migration method as described above when executed by a processor.
The file migration method provided by the application comprises the following steps: mounting a directory of the NAS file system to a current server; caching the hierarchical structure of the directory by utilizing a quick import tool of the enterprise content management system; inserting the hierarchical structure into a database of an enterprise content management system; and synchronizing the file entity of the NAS file system to the object storage equipment of the enterprise content management system according to the hierarchical structure in the database by using the import synchronization service of the enterprise content management system. Therefore, the method realizes the file migration process by utilizing the rapid import tool and the import synchronization service of the enterprise content management system, and migrates the file from the NAS file system to the enterprise content management system.
In addition, the application also provides a file migration device, equipment and a readable storage medium, and the technical effect of the file migration device corresponds to that of the method, and is not repeated here.
Drawings
For a clearer explanation of the embodiments or technical solutions of the prior art of the present application, the drawings needed for the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a first implementation of a file migration method according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating an implementation of a second embodiment of a file migration method provided in the present application;
FIG. 3 is a functional block diagram of an embodiment of a file migration apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an embodiment of a file migration apparatus provided in the present application.
Detailed Description
The core of the application is to provide a file migration method, a device, equipment and a readable storage medium, wherein a rapid import tool and an import synchronization service of an enterprise content management system are utilized to migrate a file from an NAS (network attached storage) file system to the enterprise content management system, the migration process is automatically realized, manual intervention is not needed, the time consumed in the migration process is shortened, and the file migration efficiency is improved.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a first embodiment of a file migration method provided in the present application is described as follows, where the first embodiment includes:
s101, according to the migration instruction, mounting a directory of the NAS file system to a current server;
the embodiment is applied to the current server running with the enterprise content management system, and the current server is used for migrating the file of the NAS file system to the local enterprise content management system.
Specifically, a migration instruction is generated according to a user operation, then a directory of the NAS file system is mounted to the current server according to the migration instruction, and specifically, the directory is mounted to the current server through a CIFS protocol.
S102, caching the hierarchical structure of the directory by using a quick import tool of the enterprise content management system;
in this embodiment, a fast import tool of the enterprise content management system is used to cache the directory structure of the NAS file system, that is, cache the hierarchical structure of the directory. Specifically, the entire directory structure under the NAS file system may be cached, or only a certain part of the directory structure under the NAS file system may be cached. For example, only the directory structure of files of a specified type in the white list can be cached by setting the white list; and a blacklist can be set, files of a specified type in the blacklist are filtered out from the NAS file system, and only the directory structure after filtering is finished is cached.
It should be noted that, the fast import tool of the enterprise content management system only records the corresponding relationship of the files, does not transmit the file entities, has a speed as high as 100+ ten thousand per hour, and can be used in the enterprise content management system after the import is completed. In the using process, the enterprise content management system provides functions of downloading, copying, moving, deleting and the like for all network disks, but all operations of the enterprise content management system do not change the original structure of the NAS file system, and the copying and moving operations copy files of the NAS file system to the object storage device.
S103, inserting the hierarchical structure into a database of the enterprise content management system;
specifically, the hierarchical structure of the directory in the cache can be quickly imported into the enterprise content management system by a method of inserting SQL in batches.
And S104, synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system according to the hierarchical structure in the database by using the import synchronization service of the enterprise content management system.
The import synchronization service of the enterprise content management system can synchronize the file entity of the NAS file system to the object storage device of the enterprise content management system at the background, and a user cannot perceive the process when using the enterprise content management system.
It will be appreciated that the file entities synchronized here correspond to a hierarchical structure in the database, that is, if a blacklist is set, the files of the type specified in the blacklist are not included in the files synchronized here; if the white list is set, the files synchronized here contain only files of the type specified in the white list.
In addition, after synchronizing the files to the enterprise content management system, the directories of the NAS file system may be unloaded from the current server, and during the file synchronization process, directories of the files under the enterprise content management system may be generated.
According to the file migration method provided by the embodiment, the file migration process is realized by using the rapid import tool and the import synchronization service of the enterprise content management system, and the file is migrated from the NAS file system to the enterprise content management system, so that the migration process is realized automatically, manual intervention is not needed, the time consumption of the migration process is shortened, and the file migration efficiency is improved.
An embodiment of a file migration method provided by the present application is described in detail below, and the embodiment two is implemented based on the foregoing embodiment one and is expanded to a certain extent on the basis of the embodiment one.
Referring to fig. 2, the second embodiment specifically includes:
s201, according to the migration instruction, mounting a directory of the NAS file system to a current server through a CIFS protocol;
s202, caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list and caching the hierarchical structure of the filtered directory;
s203, inserting the hierarchical structure into a database of the enterprise content management system by using a method of inserting SQL in batches;
s204, synchronizing the file entity of the NAS file system to an object storage device of the enterprise content management system according to the hierarchical structure in the database by using the import synchronization service of the enterprise content management system;
and S205, after the file synchronization is completed, unloading the directory of the NAS file system from the current server.
Therefore, according to the file migration method provided by the embodiment, the file migration process is realized by using the fast import tool and the import synchronization service of the enterprise content management system, the file migration efficiency can be improved by using the fast import tool and the import synchronization service, the manual input time is reduced, and the time for migrating the NAS file in the enterprise content management system is greatly shortened. In addition, the normal use of the files in the system is not influenced in the whole synchronization process, the user does not feel, and the use experience of the user is improved.
In the following, a file migration apparatus provided in an embodiment of the present application is introduced, and the file migration apparatus described below and the file migration method described above may be referred to correspondingly.
As shown in fig. 3, the file migration apparatus of the present embodiment includes:
the mounting module 301: the server is used for mounting the directory of the NAS file system to the current server according to the migration instruction;
the caching module 302: the system comprises a cache module, a cache module and a cache module, wherein the cache module is used for caching a hierarchical structure of the directory by utilizing a quick import tool of an enterprise content management system;
the plug-in module 303: for inserting the hierarchical structure into a database of an enterprise content management system;
the file synchronization module 304: and the file entity synchronization module is used for synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system according to the hierarchical structure in the database by utilizing the import synchronization service of the enterprise content management system.
In some specific embodiments, the cache module is configured to:
and caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list, and caching the hierarchical structure of the filtered directory.
The file migration apparatus of this embodiment is configured to implement the foregoing file migration method, and therefore a specific implementation manner of the apparatus may be seen in that the foregoing embodiment portions of the file migration method, for example, the mount module 301, the cache module 302, the insert module 303, and the file synchronization module 304, are respectively configured to implement steps S101, S102, S103, and S104 in the foregoing file migration method. Therefore, specific embodiments thereof may be referred to in the description of the corresponding respective partial embodiments, and will not be described herein.
In addition, since the file migration apparatus of this embodiment is used to implement the file migration method, the role of the file migration apparatus corresponds to that of the file migration method, and details are not described here.
In addition, the present application also provides a file migration apparatus, as shown in fig. 4, including:
the memory 100: for storing a computer program;
the processor 200: for executing said computer program for implementing the steps of the file migration method as described above.
Finally, the present application provides a readable storage medium having stored thereon a computer program for implementing the steps of the file migration method as described above when executed by a processor.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed descriptions of the solutions provided in the present application, and the specific examples applied herein are set forth to explain the principles and implementations of the present application, and the above descriptions of the examples are only used to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A method for file migration, comprising:
according to the migration instruction, mounting the directory of the NAS file system to the current server;
caching the hierarchical structure of the directory by utilizing a quick import tool of the enterprise content management system;
inserting the hierarchical structure into a database of an enterprise content management system;
and synchronizing the file entity of the NAS file system to the object storage equipment of the enterprise content management system according to the hierarchical structure in the database by using the import synchronization service of the enterprise content management system.
2. The method of claim 1, wherein said inserting the hierarchical structure into a database of an enterprise content management system comprises:
and inserting the hierarchical structure into a database of the enterprise content management system by using a method of inserting SQL in batches.
3. The method of claim 1, wherein mounting the directory of the NAS file system to the current server comprises:
and mounting the directory of the NAS file system to the current server through a CIFS protocol.
4. The method of claim 3, further comprising, after synchronizing the file entities of the NAS file system into an object storage device of an enterprise content management system according to the hierarchy in the database:
and after the file synchronization is finished, unloading the directory of the NAS file system from the current server.
5. The method of any of claims 1-4, wherein caching the hierarchical structure of directories using a fast import tool of an enterprise content management system comprises:
and caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list, and caching the hierarchical structure of the filtered directory.
6. A file migration apparatus, comprising:
mounting a module: the server is used for mounting the directory of the NAS file system to the current server according to the migration instruction;
a cache module: the system comprises a cache module, a cache module and a cache module, wherein the cache module is used for caching a hierarchical structure of the directory by utilizing a quick import tool of an enterprise content management system;
inserting a module: for inserting the hierarchical structure into a database of an enterprise content management system;
a file synchronization module: and the file entity synchronization module is used for synchronizing the file entity of the NAS file system to the object storage device of the enterprise content management system according to the hierarchical structure in the database by utilizing the import synchronization service of the enterprise content management system.
7. The apparatus of claim 6, wherein the caching module is to:
and caching the hierarchical structure of the file of the target type in the directory according to a preset white list by using a quick import tool of the enterprise content management system, or filtering the hierarchical structure of the file of the target type in the directory according to a preset black list, and caching the hierarchical structure of the filtered directory.
8. A file migration apparatus, comprising:
a memory: for storing a computer program;
a processor: for executing the computer program for carrying out the steps of the file migration method according to any one of claims 1 to 5.
9. A readable storage medium, having stored thereon a computer program for implementing the steps of the file migration method according to any one of claims 1 to 5 when being executed by a processor.
CN202010425291.4A 2020-05-19 2020-05-19 File migration method, device and equipment Active CN111597144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010425291.4A CN111597144B (en) 2020-05-19 2020-05-19 File migration method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010425291.4A CN111597144B (en) 2020-05-19 2020-05-19 File migration method, device and equipment

Publications (2)

Publication Number Publication Date
CN111597144A true CN111597144A (en) 2020-08-28
CN111597144B CN111597144B (en) 2022-09-16

Family

ID=72190394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010425291.4A Active CN111597144B (en) 2020-05-19 2020-05-19 File migration method, device and equipment

Country Status (1)

Country Link
CN (1) CN111597144B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300081A1 (en) * 2008-05-28 2009-12-03 Atsushi Ueoka Method, apparatus, program and system for migrating nas system
CN102611745A (en) * 2011-12-31 2012-07-25 成都市华为赛门铁克科技有限公司 On-line file moving method, device and system
CN105224676A (en) * 2015-10-13 2016-01-06 北京奇虎科技有限公司 The method of mobile terminal file migration and device
CN109558456A (en) * 2018-12-04 2019-04-02 郑州云海信息技术有限公司 A kind of file migration method, apparatus, equipment and readable storage medium storing program for executing
CN110032339A (en) * 2019-04-12 2019-07-19 北京旷视科技有限公司 Data migration method, device, system, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300081A1 (en) * 2008-05-28 2009-12-03 Atsushi Ueoka Method, apparatus, program and system for migrating nas system
CN102611745A (en) * 2011-12-31 2012-07-25 成都市华为赛门铁克科技有限公司 On-line file moving method, device and system
CN105224676A (en) * 2015-10-13 2016-01-06 北京奇虎科技有限公司 The method of mobile terminal file migration and device
CN109558456A (en) * 2018-12-04 2019-04-02 郑州云海信息技术有限公司 A kind of file migration method, apparatus, equipment and readable storage medium storing program for executing
CN110032339A (en) * 2019-04-12 2019-07-19 北京旷视科技有限公司 Data migration method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN111597144B (en) 2022-09-16

Similar Documents

Publication Publication Date Title
CN102594849B (en) Data backup and recovery method and device, virtual machine snapshot deleting and rollback method and device
CN109493076B (en) Kafka message unique consumption method, system, server and storage medium
CN107045422B (en) Distributed storage method and device
US20140081911A1 (en) Optimizing automatic deletion of backup files
JP2014503086A (en) File system and data processing method
US20160026699A1 (en) Method for Synchronization of UGC Master and Backup and System Thereof, and Computer Storage Medium
US10628298B1 (en) Resumable garbage collection
CN109446177B (en) Method and device for realizing number quota of directory files of distributed file system
US10795579B2 (en) Methods, apparatuses, system and computer program products for reclaiming storage units
CN110908965A (en) Object storage management method, device, equipment and storage medium
CN114138558A (en) Object storage method and device, electronic equipment and storage medium
CN112069152B (en) Database cluster upgrading method, device, equipment and storage medium
US9921918B1 (en) Cloud-based data backup and management
WO2023241528A1 (en) Data processing method and apparatus
CN113420005A (en) Data storage method, system, electronic device and computer storage medium
CN111597144B (en) File migration method, device and equipment
CN112583760B (en) Object storage access method, device, equipment and computer storage medium
CN111625397B (en) Service log backup method, cluster, device, electronic equipment and storage medium
CN115586872A (en) Container mirror image management method, device, equipment and storage medium
CN111352916B (en) Data storage method, system and storage medium based on NAS storage system
CN114443216A (en) Cloud platform mirror image management method and management system
CN113821490A (en) Data synchronization method and device
CN113625952A (en) Object storage method, device, equipment and storage medium
US11645333B1 (en) Garbage collection integrated with physical file verification
CN114258532A (en) Apparatus and method for merging backup policies

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200828

Assignee: Aerospace Hongyi (Zhejiang) Data Technology Co.,Ltd.

Assignor: Shanghai Hongyi Software Technology Co.,Ltd.

Contract record no.: X2023980040427

Denomination of invention: A file migration method, device, and device

Granted publication date: 20220916

License type: Common License

Record date: 20230824