Using a remote server, FTP operations on another remote server are much faster than local machine operations.Previously wrote an article about how FTP is manually remotely operated on Linux,Today I found an automated batch script that feels good. Meet my needs.My a site in Hong Kong my B server Linux in the country. This allows the a site to be automatically backed up to B server.Hope this blog can give the
Description1, backup directory/home/osyunwei all the following files into the/home/osyunweibak, and save as osyunwei20120701.tar.gz compressed file format (2012_07_01 refers to the date of the day when the backup is executed), Only last 7 days of backup are retained2. Upload the backup file inside the/home/osyunweibak
Share a self-written mysql automatic backup script, timed execution settings, and windows automatic FTP. Please advise. Prerequisites: vsftpd is enabled for the mysql database server and an appropriate account is configured for the Intranet storage server.
Share a self-written mysql automatic backup script, timed execution settings, and windows automatic
****************---------------------For testing convenience,Install the vsftp RPM package on the VFTP Server IP address 192.168.159.Install the lftp RPM package on the FTP Client IP address 192.168.1.153.++
On the client host# Vi/etc/lftp_bak.shAdd the following content:
#! /Bin/bash# Specify the IP address of the FTP serverServerip = 192.168.1.159# Specify the FTP
1 Ensure that you are in the home directory (if not, run: cd/home)2 New Backup folder (command: mkdir backup)3) New Script backup.shVI backup.sh
Copy the following code (after replication: wq! to save):
Copy Code code as follows:
#!/bin/bash
#你要修改的地方从这里开始
Mysql_user=root #mysql用户名
mysql_pass=123456 #mysql密码
Ftp_user=vmvps #ftp用户名
ftp_pass=123456
The names of backup files are generally regular (for example, name + Date and Time. Bak). We can use Windows batch processing to automatically perform remote backup of the system.
The procedure is as follows:
1. Create a batch processing file with the following Bak. Bat content
Echo open XXX. XXX> E: \ todo.txtEcho username> E: \ todo.txtEcho password> E: \ todo.txtEcho bin> E: \ todo.txtEcho put E: \ Date
Let's get to the point. The company now has 2 servers, are CentOS systems, a local (LAN), a computer in the telecommunications room. Because the work needs, the daily backup room data to the local, has been FTP login, and then downloaded to the local machine. Now hope, using the local CentOS machine, Automatic backup to Local.The workaround is as follows:1. Downl
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
Monitoring # tail-f/var/log/message to turn off the main service # killall-9 keepalived, you can see the backup service log output: mar 13 23:00:27 linux-backup Keepalived_vrrp: VRRP_Instance (VI_1) Transition to MASTER STATEMar 13 23:00:28 linux-backup Keepalived_vrrp: VRRP_Instance (VI_1) entering MASTER STATEMar 13 23:00:28 linux-
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log monitoring, and database backup, AWR report automatic mail, etc. This article describes how to use the shell script in Linux to implement automatic FTP backup of files.
Linux Shell and Import and Export refer
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log monitoring.
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log monitoring.
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log
Server more, the site is more and more, always feel not the whole backup heart, and there are several times RM operation errors, resulting in irreparable damage. And most VPS providers are not providing automatic backup functionality or this feature charges slightly higher prices. So it is necessary for me to put this work into practice, and maybe one day it will be used.
Use of the
Tags: upload ftp automatic backup MySQL
The previous MySQL daily backup shell script gives a script that uses mysqldump to back up to the local, followed by a script that uses FTP to transfer the backup file to the remote server. Of course, can also use Scp,rsync an
Copy Code code as follows:
#!/bin/bash
#author: 505056357@qq.com
echo "Backup Job Start"
#设置要备份的网站目录, that is, the root directory of the Web site
File=/home/wwwroot/default
#设置本地备份目录, for storing the packaged files
backpath=/home/wwwroot/bkdata/
Dbuser=root
#数据密码, remember to enclose the entire password in single quotes and double quotes if the cipher has single quotes, hehe
Dbpwd= ' 123456 '
Dbname=car
domain=192.168.0.18
RedHat Linux automatic FTP Transfer backup source: it165 [large, medium and small] [print this page] [Close Window]
If you want to transfer the file to another server via FTP after backing up the file in crontab, you can use the following method to compile shell script:
#! /Bin/sh
Ftphost = "ftp. server. Address"
U
My previous project, use the Bat+windows scheduled task to automatically back up data to a backup server.In the handover, write this thing out and hopefully inspire you to use the bat script more.One. Prepare and write the bat file for ease of maintenance split 3 files are: Bakmain.bat bakdatalog.bat (compressed and write log) ftp.txt (FTP command file)Bakmain.bat@echo OffSET spath = REM log path defaults t
This script checks the data integrity of remote backup to the ftp server and whether ftp is sent to the server, if the ftp server is not backed up in time, the script will trigger the SMS alarm function module to generate an SMS alarm. Finally, due to the limited space on the ftp
How to implement automatic backup
Five. Sh files are provided in this directory.Script files, which have the following functions:
1. Export. Sh -- export all tables whose owner is zhaoilei in the database
2. hotbackup. Sh -- full database backup for the database
3. rm. Sh -- delete useless backup and export information
4. rmsh. Sh -- trigger the first three scr
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.