Tags: flexible data complete LSP trigger date Windows CIN TagThe first type: Create a new batch file Backup.dat, enter the following code:
The code is as follows
Copy Code
net stop MySQLxcopy "C:/Program files/mysql/mysql Server 5.0/data/piaoyi/*.*" d:/db_backup/%date:~0,10%//ynet start MySQL
Note: There are spaces in the path in the batch command, you must enclose the path with double quotes!You can th
Tags: style blog ar color OS using SP strong onbased on the previous article method, the batch command is added to enable automatic backup. It is only because the name of the backup file in the batch command is special in terms of time, so it's a special sort of article. 1. Copy the date folder backup============================ hypothetical environment: MySQL
Label: Transferred from: http://www.cnblogs.com/liongis/archive/2013/03/12/2956573.html 1. Copy the date folder backup============================Hypothetical environment:MySQL Installation Location: C:\MySQLForum database name is: BBSDatabase backup destination: C:\db_bak\============================Create a new Db_bak.bat, write the following codeCode start*****************************net stop MySQLxcopy
Label:1. Copy Date folder Backup ============================ hypothetical environment: MySQL Installation Location: C:\MySQL Forum database name: BBS database backup destination: C:\db_bak\ ====== ====================== New Db_bak.bat, write the following codeCode start***************************** net stop mysql xcopy c:\mysql\data\bbs\*.* c \ db_bak\bbs\%date:~0,10%\/s/i net start mysql *****************
Tags: nbsp Control panel Space Hex-blob information. NET Method Mys Task SchedulerTransferred from: https://www.cnblogs.com/frankielf0921/p/5933127.htmlThe first type: Create a new batch file Backup.dat, enter the following code:
The code is as follows
Copy Code
net stop MySQLxcopy "C:/Program files/mysql/mysql Server 5.0/data/piaoyi/*.*" d:/db_backup/%date:~0,10%//ynet start MySQL
Note: There are spaces in the path in the batch command, you must en
1. Backup: 1.1. Create a database_exp.bat batch file
First, create the DMP and log files for seven days, and then create a batch file for exporting the database. This script can back up the database for the last seven days, as shown in database_ext.bat:
Del F: \ mydata_mytest \ oradata7.dmpDel F: \ mydata_mytest \ oradata7.logRen F: \ mydata_mytest \ oradata6.dmp oradata7.dmpRen F: \ mydata_mytest \ oradata5.dmp oradata6.dmpRen F: \ mydata_mytest \
Batch file (. bat)
@echo off
Echo ================================================
Automated backup scripts for Oracle databases in the Echo Windows environment
Echo 1. Use the current date to name the backup file.
Echo 2. Automatically delete backups up to 7 days ago.
Echo ================================================
:: Remove the current tim
Today an accident, I wrote the diary of the big half month the encrypted file is damaged and cannot be recovered. He decided to write a dedicated backup script file.
The main idea is to create a folder under current directory backup based on today's date, and then copy the files to that folder.
The script files are as follows:
01
echo off
02
Echo ******** starts backing up log files ********
03
04
Whether under Windows or Linux, a lot of log files if not regularly deleted will fill the hard disk, so you can write a script to handle the time.
The contents of the Windows BAT file are as follows;
The code is as follows
Copy Code
@echo offForfiles-p "D:\servers\apache2.2\logs"-s-m *.log-d -15-c "cmd/c del @path"Forfiles-p "D:\servers\mysql\logs"-s-m *.log-d -15-c "cmd/c del
(s), to filter out any that is already installed/usr/bin/ssh-copy-id:info:1 key (s) remain to being installed--if you are prompted now it's to install the new keys[email protected] ' s password:Number of key (s) added:1Now try logging to the machine with: "SSH" [email protected] ' "And check to make sure that is only the key (s) wanted were added.[[email protected] ~]# ls. ssh/Authorized_keys Id_rsa id_rsa.pub known_hosts########## #将id_rsa下载到本地Iii. Editing Remote Copy ScriptsSETLOCAL Set Cwrsy
you modify the corresponding files on the server, only modified files or new files will be synchronized during synchronization.
The following describes how to create a scheduled task and execute a scheduled synchronization task through the "Task Plan" in windows.
First, click "Control Panel"> "Task Plan"> "add Task Plan" on the client's machine, and click "Next" in the corresponding pop-up window, click "Browse" in the navigation window, as shown bel
execute a scheduled synchronization task through the "Task Plan" in windows.
First, click "Control Panel"> "Task Plan"> "add Task Plan" on the client's machine, and click "Next" in the corresponding pop-up window, click "Browse" in the navigation window, as shown below, and select the previously created batch file "dnt_sync.bat ":
At this time, the system will display the following window prompts the execution method of the current scheduled task. H
First we wrote a a.bat processing file, the code is as follows
The code is as follows
Copy Code
net stop MySQLxcopy D:phpstudymysqldataabc*.* d:up%date:~0,10%/ynet start MySQL
NOTE: ABC is the name of your database, up is the name you want to back up to the specified directory, then date reference is your build directory date, such as up/2013-03-06.
Now we have written the batch file and started to plan the task.
1, in You:
Back up the MySQL database every morning and automatically pack and delete the backup files 5 days ago. Share as follows.
1. Environment: Windows Server 2003 + Apache 2.0 + PHP5 + MySQL 4.0.26.
2. Suppose the PHP installation directory is d:/php, the MySQL installation directory is d:/mysql.
3. Create a directory WinRAR under d:/php and copy WinRAR.exe and Rarreg.key from your WinRAR installation directo
Label:Usually back up a database, directly trousers backup , a more complete point will be required to do a scheduled trousers backup . However, many times because the pants instances are too many, this can lead to a very time-consuming backup, so sometimes the entire database application needs to be backed up. So how do you do a scheduled
Looking at the simple python tutorial, I learned how to back up files. Record the solution here.
Info-zip: http://www.info-zip.org/Zip.html#Downloads
The Code is as follows:
Import osimport time #1. source = ['d: \ sll ', 'd: \ download'] #2. target_dir = 'd: \ pyback \ '#3 target = target_dir + time.strftime('policy?m=d=h?m=s'{}'.zip 'print targetzip_command = "zip-qr % s" % (target ,''. join (source) print zip_commandif OS. system (zip_command) = 0: print 'successfull back to ', targetelse:
1. Give root all authorized accounts SQL talentGrant all privileges on * * to [e-mail protected] "%" identified by ".";Flush privileges;2. Create a bat batch file@echo offset path=%path%;D: \program Files\mysql\mysql Server 5.5\binset Y=%date:~0,4%set m=%date:~5,2%set d=%date:~8,2 %set h=%time:~0,2%set cdate=%y%%m%%d%_%h%mysqldump-h 127.0.0.1-u root--password=*****-e-r--database cmsis > F:\da Ta\cmsis_%cdate%.sqlexitWhere Cmsis is the database to be backed up, files such as Cmsis_20140510_16.sql
Method One
Using mysqldump
The code is as follows
Copy Code
@echo offSet path=c:/"program Files"/winrar;%path%Set mysqlpath=c:/"program Files"/mysql/"MySQL Server 5.0"Set Bakpath=e:/mysql_bakSet Username=rootSet password=1234567890REM Please be careful to choose the backup mode, shielding other unwanted (front plus REM)REM Backup using Mysqldump methodmkdir%bakpath%/data%mysqlp
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.