MySql Data backup script (not original), mysql Data Backup
Create a file xxx. bat with the following content:
@ Echo offSet hour = % time :~ 0, 2%If "% time :~ 0% % "=" "set hour = time :~ 1, 1%Set now = % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% % hour % Time :~ 3,2% % Time :~ 6, 2%Echo % now %Set host = server addressSet port = port numberSet user = MySq
Tags: dual-machine hot standby database Text/* THIS4.0 database backup script [author] rulition qq:7355157 [version] v2.1 [edit] May 21, 2010 15:35:13 finish May 24, 2010 11:35:13
Details modified May 25, 2010 11:31:13 Increase the consistency check before [full backup] May 27, 2010 10:31:13 Check the size of the differential
#backup. SH #!/bin/sh #on xtrabackup 2.2.8 # When you first execute it, it checks for a full backup, or you first create a whole-Library backup # When you run it again, It is based on the settings in the script to perform an incremental backup of the previous full or increme
☆☆☆ 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
The rman backup script in the Oracle database is very practical.
The rman backup script in the Oracle database is very practical.
Query character sets
SQL> select * from nls_database_parameters;
NLS_CHARACTERSETAL32UTF8
Character Set is very important during backup, otherwis
physical operations on the database, so that the database may be suspended.RMAN> configure controlfile autobackup format for device type disk to '% F'; k to' % F'; Note: physical operation backup to diskRun {Allocate channel c1 type sbt_tape; back up the control file to the warehouse.Backup database;}If automatic backup of the control file is enabled in rman, it is still the
The rman backup script in the Oracle database is very useful for querying the character set SQLgt; select * fromnls_database_parameters; NLS_CHARACTERSETAL32UTF8
The rman backup script in the Oracle database is very useful for querying the character set SQLgt; select * from nls_database_parameters; NLS_CHARACTERSETAL32
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 envi
Label:With 0112111 incremental backup strategy, 7 days a cycle that is, Sunday level 0 backup, Week 1 2 4 5 6 with 2-level incremental backup, week 3 with 1-level incremental backupConfigure control file backup path
RMAN > CONFIGURE controlfile autobackup FORMAT for DEVICE TYPE DISK to '/u01/
Summarize the characteristics of backup.sh:
1, support the MYSQL/MARIADB database full volume backup;2, support the designated directory or file backup;3, supporting the encrypted backup files;4, support one key to upload to Google Drive (need to install gdrive and configure first)
August 21, 2016 update:1, add: Specify MYSQL/MARIADB database name for
Oracle 11g R2 rac rman backup script example
1. Switch RAC to archive Mode
1. Modify the archive mode of the database. Generally, archive is configured and the flash back area is used when RAC is installed. you can skip the steps below if you have configured archive.
SQL> alter system set cluster_database = false scope = spfile sid = '*';
2. Shut down all instances (shutdown on both sides)
SQL> shutdown imm
First I set up a folder under the/root/backup directory,#mkdir/root/backup/mysqlbackupAfter five o'clock every day, a file will be saved here.Then create a new file#vim/root/mysqlautobakInput:Filename= ' Date +%y%m%d 'mysqldump--all-databases-uroot-p (mysql password) >/root/backup/mysqlbackup/mysql$file.sql Save Exit!So that it can execute#chomd +x/root/mysqlaut
The main command for the following script is:CD $TARGET _dir/$YEAR/$MONTH/$DAY; tar-g $TARGET _dir/snapshot-czvf $FILES ${source_dir[@]} # #创建好的备份目录中, execute backup command, Here is an example of a complete command:Tar-g/tmp/snapshot-czvf/tmp/2017_full_sysbak.tar.gz/data/sh # #第一次创建快照完整备份, compress the/data/sh directory into/tmp/and save as 2017_full_sysbak.tar.gz, if the file under/data/sh is increased, w
#backup. Sh#!/bin/sh## The first time it is executed it checks for a full backup, otherwise a full-library backup is created first# When you run it again, it will be based on the settings in the script to make incremental backups from the previous full-library backup#[email
You can put this script into the crontab, his configuration file in the/etc/crontab every morning, the automatic backup of this script only once a day, and keep only the last five days of backup on the server.
The code is as follows
Copy Code
#!/bin/bash#This is a shellscript for Auto DB
Rman backup is easy to use and inexpensive for Oracle database backup and recovery. For non-catalog mode, it is undoubtedly the first choice to embed Rman scripts into shell scripts and then use crontab to make small database database backups. This article provides an easy-to-use Rman backup script based on the Linux s
Want to give subversion an automatic backup script, a look at the size of the directory, already has dozens of G.It is a good solution to make a full backup too cost system resources every day.Make a full backup once a week, and then do an incremental backup every day.
Cent
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.