☆☆☆ Daily automatic backup site data and database upload ftp☆☆☆
This way, the main is a script (including compressed site data and database, upload), and then use the cron command every day in a specified period of time to run, see the script code (script information needs to set itself)
The
Feature Description:The script is used to transfer the local directory to the remote server on a regular basis (in conjunction with crontab), with each execution generating a time-named directory, and the current version of the data is linked to a symbolic link with the first name, so it is easy to find and recover. Before the data transfer is complete, it is transferred to the TEMP directory, which is named "Time-incomplete". Backups older than 10 da
Rsync is a data image backup tool in Linux. It can be seen from the software name-remotesync. Rsync supports most Unix-like systems, including Linux, Solaris, and BSD.
I. rsync
CommandIntroduction
Rsync is a command for Synchronizing files to a Linux system. It can synchroni
Rsync server to receive file transfer requests, so the client can either send the file to the daemon, or request the file to the daemon process. Rsync's server model is ideal for use in offsite central backup servers or data offsite repositories.Enterprise case: Building a remote disaster recovery backup systemIn order to ensure data security, the need to establ
Rsync random start script and rsync script
Server
1 #!/bin/sh 2 # chkconfig: 2345 21 60 3 # description: Saves and restores system entropy pool for \ 4 #create by xiaohu 5 #2014.06.02 6 #This script is the Rsync service
rhel4home
Note: The permission attribute of the password file must be set to only the primary readable.
In this way, no password is required. In fact, this is important because it is necessary for the server to schedule tasks through crond;
B3. Enable the rsync client to automatically synchronize data with the server
The server is a heavyweight application, so network backup of data is extremely important.
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source,
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source,
The password file format is simple, and the Rsyncd.secrets content format is:
User name: Password
What we rsyncd.secrets in the example is similar to the following: In the document, some systems do not support long passwords and try to set them.
Easylife:keerRoot:mike
Chown Root.root rsyncd.secrets #修改属主chmod rsyncd.secrets #修改权限
Note: 1, will rsyncd.secrets this password file file attribute to root owned, and permissions to set to 600, otherwise can not
simple, and the Rsyncd.secrets content format is:
User name: Password
What we rsyncd.secrets in the example is similar to the following: In the document, some systems do not support long passwords and try to set them.
Easylife:keerRoot:mike
Chown Root.root rsyncd.secrets #修改属主chmod rsyncd.secrets #修改权限
Note: 1, will rsyncd.secrets this password file file attribute to root owned, and permissions to set to 600, otherwise can not backup success! For sec
Use reverse CT for rsync for server synchronous backup and rsync server configuration
Use reverse CT to remove the delivery process to Achieve Synchronous server backup
First, install keep CT
Check whether audit CT is installed
Rpm-qa | grep tcl
Tclx-8.4.0-5.fc6
Tcl-8.4.13-4.el5
Second, install keep CT
:
Http://dl.osch
that the user does not have access to. This is useful for situations where some files in a directory that need to be backed up should not be available to the backup person.Transfer loggingMake the Rsync server use FTP-formatted files to record download and upload operations in its own separate log.Log formatWith this option, users can customize the fields of the log file by using transfer logging. The form
/var/html/www4) The Log Path accessed by Web server A is assumed to be (/app/logs)5) The Web server retains the backup data for 7 days after packaging. Backup Server B retains a 6-month copy of data.6) the backup server B is saved in the directory according to the IP address of the backup data server, and the packaged
configure what files. A script is OK.
# vi/etc/rc.d/init.d/rsync.sh
#!/bin/bash
unset verb Progress
For i in $*; Do
["$i" = "verb"] verb=v
["$i" = "Progress"] progress= "--progress"
Done
rsync_server=192.168.10.3 #rsync SERVER IP
Auth_user=backup
bakroot=/var/backup/
Inc_dir=increment
now= ' Date +%y-%m-%d_%h:%m '
Brief introduction
For the choice of Linux as an application platform for small and medium-sized enterprises or Web sites, often face how to achieve remote Data backup or Web site mirror image of the problem, although there are commercial backup and mirror products to choose from, but these products are often too expensive prices. So how to use free software to efficiently implement remote
)
# Rsync-vzrtopg -- progress -- password-file =/etc/rsync. pas/backup/web/rsync@10.0.0.10: backup
This command backs up all files (including subdirectories) in the local machine/web directory to the backup directory set by the
Rsync + sersync for real-time file backup
Part 1: operate on the target server 192.168.0.2171. Install Rsync on the OA file backup server1. Disable SELINUXVi/etc/selinux/config # edit the firewall configuration fileThe Code is as follows:
# SELINUX = enforcing # comment out# SELINUXTYPE = targeted # comment outSELINUX
indicates that if the server deletes the file, the client also deletes the file accordingly to ensure true consistency.In inburst @ IP,
Inburst is the user name in the specified password file, followed by: inburst this inburst is the module name, which is customized in/etc/rsyncd. conf. The last/tmp is backup.
To the local directory name.
You can also use the-e SSH parameter to establish an encrypted connection. You can use -- password-file =/passwor
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.