Python simple Backup File Script v1.0 instance,
Overall Thinking
The directory to be backed up is listed as a list, which is compressed and backed up by executing system commands.
The key lies in constructing commands and using OS. system () to execute. At first, the zip command was never successful. Later, we found that this command was not available in Windows. We also needed to install the GnuWin32 proje
Install an lftpyum-yinstalllftp script to automatically back up the database www.2cto.com # every day #! /Bin/bash/usr/local/mysql/bin/mysqldump-uusername-ppassword -- databasesblog gt;/home/wwwroot/backup/da... install an lftp yum-y install lftp script to automatically back up the database www.2cto.com # every day #! /Bin/bash/usr/local/mysql/bin/mysqldump-uuse
Backup | script
Into the DB2 control center, on the Tools menu bar script, selected the system name
In the script menu, select new, in a pop-up window selection, set up the script name and the working directory and the script
Tags: MySQL database sub-Library sub-table backup scriptMySQL Database sub-Library sub-table backup script=================== students to share the sub-database sub-table ==========================The difference between a script single double quote:Single quotes are strong references, forcing output is WYSIWYG.Double q
Oracle automatic backup script
Requirement: the user's database is automatically backed up at every day, and the backup information is retained for 30 days.
1: Write an oracle environment script
$ Vi oracle_hj.sh
ORACLE_BASE =/doiido/oracle; export ORACLE_BASEORACLE_HOME = $ ORACLE_BASE/102; export ORACLE_HOMEORACL
Tags: Linux OPS linux operations engineer1) Prepare test data: Build a table and insert test data in bulk by writing scripts.[email protected] scripts]# cat ceshi.sh#/bin/bashPath= "/usr/local/mysql/bin: $PATH" #定义mysql命令所在路径Myuser=root #定义数据用户名Dbpath=/server/backup #定义数据备份目录mypass=xiwei1995 #定义数据用户密码Socket=/tmp/mysql.sock #定义数据库sock文件, specifying the corresponding path for multiple instancesMycmd= "Mysql-u$myuser-p$mypass" #定义登录数据库的命令For dbname in te
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 a
In general, we will use SQL Server's own database maintenance plan to define the backup.
Sometimes, however, some machine database maintenance plans do not successfully implement backups.
The reason for the error may vary, and we can use a simple SQL Server backup script to do the backup.
SQL statement that generates a
Tags: blog CTI incremental backup completely let script keep Max exp MySQL full-scale backup, incremental backup. Turn on MySQL's logbin log feature. Add the following code to the/etc/my.cnf file: [Mysqld]Log-bin = "/home/mysql/logbin.log"Binlog-format = ROWLog-bin-index = "/home/mysql/logindex"binlog_cache_size=32mmax
Every day, the mysql script is automatically backed up and scheduled to execute the script:
1. execute
Crontab-e
00 00 ***/bin/bash yourpath/mysqlbak. sh2. open the automatic execution file vi/etc/crontab and add the following content to etc to enable it to automatically execute the task. 00 00 *** root/mysqlbak. sh and above 00 *** are automatically executed every morning
Hour, day, month, and Week comman
In an Oracle database, Rman backs up a lot of scripts, and here's a case of how a shell script can be backed up by Rman, and FTP uploads the Rman backup file and the archive log file script.
fullback.sh inside call rman command do database backup, it uses Cmdfile for/HOME/ORACLE/B
aJoinSys.dm_hadr_database_replica_states b ona.group_id=b.group_id anda.replica_id=b.replica_idwhereRole=1OpenMyCursorFetch Next fromMyCursor into @dbname--gets the name of the database that needs to be backed up (the database in always on) while @ @FETCH_STATUS=0begin Print @dbnameexecDba_backupfulldb@delday,@bakpath,@dbnameFetch Next fromMyCursor into @dbnameEndCloseMyCursordeallocateMyCursor2. Available stored procedures for log backups: Use [Xxdb]GOSETAnsi_nulls onGOSETQuoted_identifier o
@ Echo off @ echo ========================================== =================@ echo in Windows environment, the Oracle database's automatic backup script @ Echo 1. The current date is automatically used to name the backup and export files. @ Echo 2. automatically delete the backup seven days ago @ echo ===============
Shell simple full-backup mysql script case [root @ cacti mysql] # cat backup. sh #! /Bin/sh www.2cto.com # created by taiyang #2012-9-16 # function: backup mysql database # set local variablesDBname = backupBackupPath =/mysqlbak/DumpFile =$ {BackupPath }$ {DBname} 'date + % y % m % d _ % H % M % s '. bak v_username = '
Online MySQL backup script
Recently, I am studying database backup and regularly execute the backup task. Here I set the backup script to the crontab command for regular execution. The script
Recently busy with the virtual machine, what data need to be backed up, even if the virtual machine is no exception, the following is my own written backup script to use according to the actual situation,:
First do an NFS server, this server requires a large disk, and then need to back up the virtual server host on the shared directory
Then you can implement a script
#!/bin/shlog=/var/log/mysql-backup.log# MySQL db infouser_root=xxxxxxuser_pwd=xxxxxxx# mysql data stored dirTODAY= ' Date +%f ' storedir=/mnt/tf-card/mysql-back/$TODAYmkdir $STOREDIRecho "* * * PATH: $STOREDIR mysql-backup * * *" >> $ log# Delete Overtime backup filesrm-rf/mnt/tf-card/mysql-back/$ (date +%f--date= ' days ago ') # Backup MySQL data filemy Sqldump-
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.