Use cwRsync to back up server files and databases

Source: Internet
Author: User
A website is built on a server in the school. to ensure data security, you need to back up data files to another computer, including site files and databases. I found it online. in addition to the charged FileGee, there is also a free and powerful cwRsync. CwRsync consists of two parts: server-side software and

A website is built on a server in the school. to ensure data security, you need to back up data files to another computer, including site files and databases. I found it online. in addition to the charged FileGee, there is also a free and powerful cwRsync.

CwRsync consists of two parts: server-side software and client-side software.

I have not studied it in depth. I only know that it is very powerful and only meets my current needs: A simple regular backup of site files and database files on the server to another computer.
First, download the server and client, install the server version software on the server, and install it smoothly. after installation, it automatically adds a cwRsync service, but it is manual and is not started at this time.

Then you need to manually modify its configuration file, which has a rsyncd under the program root directory. conf file, open it with notepad, and follow the example named test in it to modify the following path:

[Test]
Path = e:/test
Comment = Data Backup for Summers laptop
Read only = no
Then, you can add the following two sentences to the header:

Port = 52315 # define the opened service port
Lockfile = cwRsync. lock # defines lockfile for synchronization.

The following is a description of the server configuration file collected from the network:

Explanation:
Uid = nobody
Gid = nobody
Use chroot = no # Do not use chroot
Max connections = 4 # the maximum number of connections is 4
Pid file =/var/run/rsyncd. pid
Lock file =/var/run/rsync. lock
Log file =/var/log/rsyncd. log # log record file
[Inburst] # Here is the authentication module name. you must specify
Path =/home/inburst/python/# directory for image creation
Comment = backup client is solaris 8 E250
Ignore errors # ignore unrelated IO errors
Read only = yes # read-only
List = no # column files not allowed
Hosts allow = 172.25.43.57 # allow IP address connection
Auth users = inburst # The authenticated user name. if this row is not used, it indicates that it is anonymous.
Secrets file =/etc/inburst. pas # authentication file name

Save the modification, open service. msc, and start the service. Step 2: install the client software on another computer. the installation is very simple.

Then you need to write a bat batch file and put it in the bin directory. the content is as follows:

Rsync-av rsync: // 10.10.55.2: 52326/t_hqtechSiteDB/cygdrive/h/sync/db
Rsync-av rsync: // 10.10.55.2: 52326/t_hqtechwebsite/cygdrive/h/sync/web
The preceding commands back up the database files and site files to the local H: sync folder. T_hqtechSiteDB and t_hqtechwebsite are like [test] set in the above rsyncd. conf configuration file.

Option description:
-V, -- verbose detailed mode output
-Q, -- quiet simplified output mode
-C, -- checksum: enable the verification switch to force file transfer verification
-A, -- archive mode, indicating that the file is transmitted recursively and all file attributes are kept, equal to-rlptgoD.
-R, -- recursive processes subdirectories in recursive mode
-R, -- relative uses relative path information
For other parameters, see The rsync manual.

Then, combined with the scheduled tasks on the local computer, you can implement timed automatic backup. If you want to retain the backup for the last three days, you can also use the scheduled task. However, you need to write three batch files to specify the backup to different folders.

In general, cwRsync is very powerful. Detailed usage instructions are provided in its doc, which is full of English and can be easily understood with patience.

 

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.