How to achieve file synchronization without a network disk

Source: Internet
Author: User
Tags backup robocopy

The network disk synchronization function is actually to compare the files on the network disk server with the files of the local synchronization directory, and then automatically copy the new files. Therefore, if you want to implement the synchronization function for users sharing the shared directory with the server, we can only use the Replication tool to automate the replication.

Because synchronization simply copies a local directory file to a shared directory to save the backup, it can be implemented with the system's own Robocopy command, which is accomplished with a task plan. The following is an example of a Windows 10 system.

Enter Task Scheduler in the Search box. Start the system with the Task Scheduler component and click "Create Task" and follow the wizard's prompts to create a new "Sync file" task, which starts at 17:20 every day (assuming 17:30) and starts the replication task every day at 17:20 (Figure 1).

Figure 1 New Daily Task execution

Switch to "action", the action is "Start Program", the program that executes is "Robocopy", the parameter is "K: Decompression \fdvdsf-pc decompression/mir", this batch program will copy the specified file in incremental copy to the shared directory on the server (Figure 2).

Figure 2 Startup parameter settings

Command explanation:

K: Decompression: Refers to the local directory that the machine needs to replicate to the shared directory on the server

\FDVDSF-PC decompression: Refers to a shared directory where local backup files are saved on the server, and shared directory paths can be opened for viewing in network components (Figure 3).

Figure 3 View the path to the shared directory

/mir: Enables mirroring to be replicated so that all changes in the local directory (including new, modified, deleted) files can be copied to the shared directory for saving. If you need bidirectional synchronization, then you can set up a task plan, such as "Robocopy \ fdvdsf-pc Decompression k: extract/mir" Every morning at 8, so that the files on the server are synchronized to the local directory, such as after the server shared directory deletes files, A file with the same name as the local directory will also be deleted synchronously after executing the above command. In order to facilitate the use, can also be combined with the above command, add "shutdown–s" Production for batch processing, the realization of automatic synchronization after the shutdown.

Complete the above settings, so that every day to 17:20, the Robocopy command will automatically copy the local files to the server, later in the local directory changes in the file, at 17:20 will automatically sync to the server, to achieve similar network disk synchronization effect (Figure 4).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.