☆☆☆ 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
Scripting Features:The script is run by a timed scheduled task, and the specified file is uploaded periodically.Before writing this script, sometimes the network is unstable, always upload failed. Write a loop to pass, but do not know how to get the error state of the FTP return, later Niang to the FTP can be run error
First, install email send program
Copy Code code as follows:
Yum Install SendMail Mutt
Second, install the FTP client program
This script needs to use an FTP client program to upload files to the FTP space, so you must install the FTP client, o
Vulnerability warning: FTP exposes a severe remote execution vulnerability, affecting multiple versions of Linux (with a detection script)
On July 6, October 28, a public email showed the FTP remote command execution vulnerability. The vulnerability affected Linux systems include: Fedora, Debian, NetBSD, FreeBSD, OpenBSD, it even affected the latest version of io
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
This article mainly introduces how to compile a Python script to implement the simplest FTP download tutorial. It mainly uses the ftplib module and has no graphical interface... if you need a friend, refer to accessing FTP. There are only two things: upload and download. Recently, you need to download a large number of files from
stability, the compression code server is usually separated from the Web server, which requires us to transfer the recorded video files to the Web server on a daily basis. FTP commands in batch files are perfect for this function.
The following is the code in the Transfer.bat batch:
@echo off
Ftp-s:media.txt
If ex
Recently customers need to use FTP upload video business to me. 0.0 is very tangled why do not give the URL, do not want to give FTP, I also have to download upload to our serverGroped for a moment and wrote a brief script. (finally useless, with someone else's python written) determined to learn python!!!!Script:#!/bi
I. First, let's look at the following in linux:
Copy codeThe Code is as follows :#! /Bin/bash
Cd/ftp/
CURRENTDATE = 'date + % Y % m % d'
YESTERDAY = 'date-d yesterday + % Y % m % d'
THREEDAYAGO = 'date-d' 3 days ago '+ % Y % m % d'
# Echo $ TWODAYAGO
Ftp-n-I 34.97.34.3 User ftpuser
Bin
Mput $ YESTERDAY .*
Delete $ THREEDAYAGO .*
Bye
!
Note: This script
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. Download the data that has been packaged on the machine in the remote telecommunication room. T
Linux-based FTP scripts:1#!/bin/SH2 3 4 CD5Echo"completely uninstall the original FTP"6sudo apt-GetRemove--purge vsftpd # (--purge option means complete removal of software and related files)7 8Echo"Installing the VSFTPD server"9sudo apt-GetInstall VSFTPDTen OneEcho"configuration file" A #匿名访问 -sudo sed-i-E's|anonymous_enable=yes|anonymous_enable=no|'/etc/vsftpd.conf - #设定本地用户可以访问. thesudo sed-i-E's| #loc
Various points of knowledge are written in the notes.
Only need sudo $PATH/ftpsetup.sh, default to test/test for user name password login, after the root directory read-only, subdirectory writable writable.
Test OK on Ubuntu 13 and Linux Mint 15.
Copy Code code as follows:
#!/bin/bash
# by Liuhx 2013-nov-04.
# Script to set up FTP environment. The FTP
Share a practical script to transmit the recordings generated by asterisk to a separate recording storage server through the system cron and transmit the recordings generated every day to a separate recording server, I have been using this script. In the LAN, tens of thousands of recordings are transmitted every day, which can be completed in an hour. I hope it will help you [plain] #! /Bin/bash #2013/4/24-
ftp.sh1#!/bin/SH2 3 CD4Echo"completely uninstall the original FTP"5sudo apt-GetRemove--purge vsftpd # (--purge option means complete removal of software and related files)6 7Echo"Installing the VSFTPD server"8sudo apt-GetInstall VSFTPD9 TenEcho"configuration file" One #匿名访问 Asudo sed-i-E's|anonymous_enable=yes|anonymous_enable=no|'/etc/vsftpd.conf - #设定本地用户可以访问. -sudo sed-i-E's| #local_enable =yes|local_enable=yes|'/etc/vsftpd.conf the #设定可以进行写操作 -su
known as a batch program or script) to simplify routine or repetitive tasks.Second, bat common syntax commandsEcho commandTurn on echo or turn off the request Echo feature, or display a message. If there are no parameters, the echo command displays the current echo setting.Grammar echo [{on| OFF}] [message]
/echo Hello World In practical applications we will combine this command with a redirect symbol (al
Since the beginning of the use of VPS is particularly important to focus on data security, whether we use the Web panel, or the use of a key to install the package, or even directly compile the environment, we can choose to manually backup on a regular basis, you can also use the Web Panel with the Backup tool. Today, a user mentioned the backup of the LLSMP environment, so in this article, the old left to share the blog once had an automatic backup script
Converting a DOS batch file to a shell script Quite a few programmers who learn scripts on a PC are running DOS. In fact, the Disabled DOS batch file language can also write some powerful scripts, although they generally need to rely on external tools. So, at some point, we still need to convert old DOS batch files int
Script Name: uploadtoftp.shScripting Purpose: Uploading files to an FTP serverScript parameters: $1:ftp server path, $: Local file#!/bin/Bashftp_user="testfile"Ftp_password="viewt00! QAZ"Ftp_url="192.168.2.11"File_path=" $"file_name=" $"if["$#"!="2"]; Then Echo "uasge:uploadtoftp file_path file_name"Exit1fiFTP-N open ${ftp_url}user ${ftp_user} ${ftp_passwo
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.