This is a regular directory backup file. the MD5 check is used to determine whether the Directory and file are modified today and yesterday. If not, delete the Backup Directory of yesterday. Reduce disk space consumption. Some backup directories may be very large. We generally refer to modifying one type of files. We can select the specified file type to back up
The following script executes full backup of a database in SQL Server and transfers the backup file to another Server. Backup File naming rules: Database name_timestamp. BAK.
Execution Environment windows 2003 server SQL Server 2000
Source code:
@ Echo off
Rem backup databa
because the last time to do the project, the customer asked for the system state to do automatic backup, at that time feel that their script is not enough on the grade, began to search the internet a variety of better scripts, and now found a pretty good script, with everyone to analyze share. In fact, I looked at the first time a small part of the middle did not
mysql| Backup | script | data | database
You can put this script into the crontab, run it every morning, and automate the backup this script is executed at most once a day, and only the last five days of backups are kept on the server.
Code:
#!/bin/bash#This is a shellscrip
Automatic backup script for Oracle databases in Windows
@ Echo off echo ============================================ ================= echo in Windows environment, the Oracle database's automatic backup script echo 1. use the current date to name the backup file. Echo 2. aut
Mysql backup script mysqldump Usage Details, mysqlmysqldump
This example shares the mysql backup script for your reference. The specific content is as follows:
#! /Bin/bash # Full backup mode, generally executed on the slave machine, suitable for small and medium mysql Datab
-type f-name "*.dmp"-exec rm {} \; #删除日志文件Find $bakdir/$orowner-type f-name "*.tar.gz"-mtime + $days-exec rm-rf {} \; #删除7天前的备份 (note: {} \ has spaces in the middle)SCP $bakdir/$orowner/$ordatabak 192.168.0.10: $remotePath #将备份文件上传到远程服务器 If you do not lose the password upload please refer to Http://blog.sina.com.cn/s/blog. _957ef38b0102vuxy.html: wq! Save exit(3) Add script execution permissionschmod +x/backup
During our online maintenance work, we often need to back up some data. Although it is not complicated, it takes a lot of time. I will share a Linux backup script here to implement automatic backup with ease, in addition, the files backed up in N days can be retained. This script is divided into two files, one is the e
#!/bin/bash #this is a script of MySQL backup if [!-d/mydata/data1/backup]; then mkdir/mydata/data1/backup fi CD
/mydata/data1/backup file=$ (find.-type f-mtime-7 | grep. *all.sql) #查找7天内是否有备份的文件 echo $file if [-Z $file]; then echo "Ba
In a UNIX system environment, you can use a variety of Unix shells combined with cron tasks to achieve automatic backup of MySQL, that under Windows How to implement it, It's very simple. Just write a custom batch script in conjunction with Taskschd.msc (Task Scheduler), you can implement, recently need to modify the tuning Windows environment of MySQL in the way to write a logical
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
Tags: shell mysql mysqldump(1) Ideas(2) Practical casesWrite MySQL database backup script, you can backup any database, enter a, backup a library, enter B, backup B library, enter C, backup C library, enter all, back up all databa
;source D:/i5a6.sql
Above all is the comparison scattered code, below we look at the shell code
The first thing I want to bring to you in this article is the full script. The script is described later. I assume you already know shell scripting, mysqldump and crontab.
Database Export Code
The code is as follows
Copy Code
#!/bin/bash #1. Database Information definition
CRONTAB calls the backup scriptPay attentionEnvironment VariableSettings are the main content we will introduce in this article. We know that EXP backup is one of the common operations of DBA, especially in versions earlier than 10 Gb without EXPDP, all logical backups are implemented through EXP. Writing EXP into a SHELL script makes it possible to call it. Howe
because the online database is a bit large, the disk does not have a raid, and the server is scarce. Originally wanted to use Xtrabackup to do incremental backup, but a variety of errors, I have lost confidence in it, so, write a script to achieve.The script is divided into two parts, part is full backup, this is nothi
The following script performs a full backup of a database in SQL Server and passes the backup file to another machine. Backup file naming rule: Database name _ timestamp. Bak.
Execution Environment: Windows 2003 Server SQL Server 2000
@ECHO offREM Backup Database
Backup is a top priority for DBAs. No matter how powerful your technology is and there is no backup, you are still helpless when something goes wrong.
Here is just the BACKUP command summarized in the work. The scripts collected in the future will be continuously updated ......
1. In the RAC environment, if the archivelog of the two nodes are stored locally, how
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.