Windows website file sync backup solution-cwRsyn

Source: Internet
Author: User
Tags server installation and configuration

For a website, synchronous backup of uploaded files is a problem that must be solved. For large websites with massive file uploads, a distributed storage system is generally used. For websites with a small volume of uploaded files, you only need to save the synchronous backup of uploaded files on another server to avoid single point of failure (spof. If a distributed storage system is used, the cost is not very high, and cwRsyn is a good choice.

The following describes how to use cwRsyn for file synchronization.

CwRsync is a file synchronization solution for Windows. cwRsync packages rsync and cygwin. rsync is a file synchronization software for Linux, and cygwin is a Linux Simulation Environment running on Windows.

1. cwRsync Server installation and configuration

1) download and install cwRsyncServer: http://sourceforge.net/projects/sereds/files /.

During the installation process, a User Creation window appears. After you enter the user name and password, the installation software automatically creates a Windows account. This account is used to run the RsyncServer Windows Service (note that this account has permissions on the folder to be synchronized). Of course, you can also use a system account to run the service. After the installation is complete, the RsyncServer service appears in the management tools service.

2) modify the configuration file rsyncd. conf. The configuration file is as follows:

 use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
uid = 0
gid = 0
[test]
path = /cygdrive/f/test
read only = false
transfer logging = yes

Configuration File description:

A) uid = 0 and gid = 0 are set for anonymous access, so that user verification is not required during client synchronization. If this setting is not performed, the client will receive an error message "invalid uid nobody" or "invalid gid nobody" during synchronization. If you need user authentication, You Need To perform other settings.

B) [test] is equivalent to a virtual directory. During client synchronization, this name is used to access the folder to be synchronized on the server.

C) path =/cygdrive/f/test, the actual path of the synchronization folder, f/test = f: \ test.

3) Go to the management tools service and start the RsynServer service.

Note:

A) The default port of cwRsyncServer is 873. to specify a port, add: port = port to rsyncd. conf.

B) after rsyncd. conf is modified, it takes effect only after the RsynServer service is restarted.

2. Client usage

1) download and install the cwRsyn client: http://sourceforge.net/projects/sereds/files /.

2) execute synchronization through the command line:

Assume that the IP address of the cwRsync server is 192.168.0.58 and the default port 873 is used. The virtual directory to be synchronized is test, and the synchronization folder on the client is h: \ sync \ test, run the following command for synchronization:

Rsync-av rsync: // 192.168.0.58: 873/test/cygdrive/h/sync/test

Note: If a file is deleted from the server, the client will not delete the file on the client during synchronization, but will only synchronize the added and updated files.

3) create a synchronization batch file and add it to the task plan.

To enable automatic synchronization on the client, you need to place the synchronization command in the batch file and add the batch file to the task plan.

The usage of cwRsyn is described here.

 

Related Articles:

Use cwRsync to implement regular file synchronization (Backup) in windows)

Tried cwRsync successfully.

Rsync + cwRsync deployment of BBS file dual-Machine backup note

Related Article

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.