Linux can use the crontab system to regularly back up the MySQL database every day, the following are detailed steps:
1, create the path to save the backup file/mysqldata
#mkdir/mysqldata
2. Create/usr/sbin/bakmysql files
#vi/usr/sbin/bakmysql
Input
rq= ' Date +%y%m%d '
Tar Zcvf/mysqldata/mysql$rq.tar.gz/var/lib/mysql
or write
rq= ' Date +%y%m%d '
Mysqldump–all-databases-u root-p980405 >/mysqlda
Tags: this www ase shel path shell. com off mysqld1. Add backupmysqleveryday.sh (vi/data/shell/backupmysqleveryday.sh)#!/bin/sh#this Shell is the user for backup MySQL data everyday#author: www.ieliwb.com#path-configbase_mysql_path=/data/webserver/mysql/mysql_dump_path=/data/mysqlbackup/mnt_back_path=/mnt/web/mysqlbackup/ftp_back_path=mysql_data_backup/#mysql-configMysql_user= "Root"Mysql_pass= "*******"#ftp-configftp_host= "IP"Ftp_user= "********"Ftp
356 bytes received 133 bytes 75.23 bytes/sectotal size is 0 speedup is 0.00Chapter Two: Pull the file over, Test failed!!!! Reason not found[[emailprotected] ~]# rsync -avP 192.168.72.132:/root/xavi/ ./test1/ssh: connect to host 192.168.72.132 port 22: No route to hostrsync: connection unexpectedly closed (0 bytes received so far) [Receiver]rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9][[emailprotected] ~]# rsync -avP 192.168.72.132:/root/xavi/ ./test1/ssh: connect t
Many commands are not common when backing up a Linux system. In this article, we will see several very useful Linux system backup commands. In fact, Linux system backup is also divided into different forms.
Common vdump methods:
1) For files that need to be backed up in read
In linux, the Web server backup and recovery script can be used in both centos and freebsd, but the variable TAR in the script to be modified is the tar command path of the system. The script is as follows:
In linux, the Web server backup and recovery script can be used in both centos and freebsd, but the variable TAR
end of a string.Example:C:\Documents and Settings\user>echo%date%2012-08-08 WednesdayC:\Documents and Settings\user>echo%date:~5,10%08-08 Week ThreeC:\Documents and Settings\user>echo%date:~5,4%08-0C:\Documents and Settings\user>echo%date:~5,5%08-08Cwrsync Command Explanation:Rsync.exe--delete-az "/cygdrive/d/adbackup/addata" [email protected]::adbackup--password-file=]/cygdrive/d/ Adbackup/command/cwrsync/pass.txt "--delete-az de-sync to keep both ends of the file consistent"/cygdrive/d/adback
Linux automatically backs up 111 and 117 servers for websites and databases. each day, 111 servers and databases are automatically backed up to 117 servers. 1: My 111 servers are the current users: sxA: view the scheduled tasks of the current user: crontab-l is used to view the tasks of the current user... linux automatic backup of websites and databases
The two
How to Use rsync in Linux for data backup, linuxrsync
For various organizations and companies, data is the most important to them. Even for e-commerce, data is equally important. Rsync is a tool/software that backs up important data through the network. It is also a network protocol for synchronizing folders and files between systems through the network on Unix-like and Window systems. Rsync can copy or dis
In Linux, how can I back up my previous work more conveniently? Do I need to package the package by typing commands every time? The best way is to use the powerful shell in Linux.
The following is a simple example. It is used to back up shell scripts of flodername1 and flodername2 in two folders. Each backup is differentiated by the system time during the
Backup and Recovery
For example, we want to back up the MySQL already exists in the database named Linux, to use the command mysqldump
The command format is as follows:
[Root@linuxsir01 root]# mysqldump-u root-p linux >/root/linux.sqlEnter Password: Enter the password for the database here
For example, the AAA library created by the previous example is backed
We back up some files to be retained during learning or entertainment. In order to solve the data disaster, we can find and process the files we need in time, so we should back up the data of the files. What we want to talk about today is how to back up data in Linux.
1. manual backup of local dataOn Linux, there is a powerful tar command. tar was originally desi
Transferred from: http://blog.csdn.net/sunnylgz/article/details/8055315Before using Ubuntu, I believe many people have experienced the use of Windows systems. If you've backed up your Windows system, you must remember that you first need to find a backup tool (usually private software) and then restart your computer to the software environment provided by the Backup utility where you can back up or restore
and log filesFind $ bakdir/$ orowner-type f-name "*. log"-exec rm {}\; # Delete the backup fileFind $ bakdir/$ orowner-type f-name "*. dmp"-exec rm {}\; # delete a log fileFind $ bakdir/$ orowner-type f-name "* .tar.gz"-mtime + $ days-exec rm-rf {}\; # Delete backups 7 days ago (note: {} \ There is a space in the middle): Wq # Save and exitChmod + x/backup/oracledata/ordatabak. sh # Add the script executio
Windows System Backup can be completed using the ghost tool. Linux systems cannot rely entirely on the ghost tool. First, ghost itself is copyrighted, second, ghost only supports Linux partitions of ext2 and ext3 file systems. It does not support reiserfs, XFS, and other advanced file systems. Ghost itself does not back up MBR, therefore, grub Errors often occur
How does Clonezilla perform Linux backup and recovery? -- Linux general technology-Linux technology and application information. For details, refer to the following section. Hello, everyone!
Ask about how Clonezilla backs up and recovers Linux.
For example, the system auto
Whatever the system, the safest way. After debugging, make a backup. If you encounter any major problems, you can recover them directly, which is convenient and easy to handle.
The following describes the Linux backup and recovery methods:
The backup and recovery system is responsible for
We have a financial system that focuses on the security of financial data. At the same time, we have two systems: a production environment (Linux) and an emergency backup environment (Windows ). Backup Ring
We have a financial system that focuses on the security of financial data. At the same time, we have two systems: a production environment (
Before using Ubuntu, I believe many people have experienced the use of Windows systems. If you've backed up your Windows system, you must remember that you first need to find a backup tool (usually private software) and then restart your computer to the software environment provided by the Backup utility where you can back up or restore your Windows system. Norton Ghost is a
LINUX Server automatic backup and upload-Linux Enterprise Application-Linux server application information. The following is a detailed description. This problem can be said to be a comprehensive test of linux System Administrator capabilities: seemingly simple, but actually
...Connected to 192.168.1.1 (192.168.1.1). Escape character is ' ^] '. @RSYNCD: 30.0Synchronizing data in order to enter the password is not entered manually, we also create a client-side password file (this file path and password to the same server side, the client does not have to write the name) [[email protected] ~]# echo "123" >/etc/ Rsyncd.secrets #文件名可以不一样, but in/etc [[email protected] ~]# cat/etc/rsyncd.secrets123[[email protected] ~]# chmod 600/etc/ Rsyncd.secretsSynchronizing data on
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.