forBack_dirinchSource: forRoot,filedirs,filesinchOs.walk (back_dir): forFileinchFiles:z.write (Os.path.join (root,file)) Z.close ()Print('successfully backed up to', target)Backup Successful!Additional improvementsUse date as folder, time as default file name, allow user to enter note name by themselves1. If there is no today's date folder, create a2. The user entered their own name, using the name (replace the space with _ to prevent problems in pro
#!/usr/bin/env python #coding =utf8 #author: Itnihao #mail: itnihao@qq.com #source: Http://code.taoba o.org/p/python2/src/trunk/#version: 1.0 ' function: MySQL backup. Use Mysqldump to backup the libraries in mysql 1.user,pass,host,path,del parameter is variable 2. The default backup deletion cycle is 5 days, and the backup
Oracle Database backup script under RedHat Linux 5
#! /Bin/shExport ORACLE_HOME =/app/oracle/product/10.2.0/db_1;Export ORACLE_SID = orcl;Export NLS_LANG = "SIMPLIFIED CHINESE_CHINA.UTF8 ";Export F = $ (date + % y % m % d % H % M % S); # Use the date plus time as the backup file nameBackupdir =/opt/DataBackup # directory of
Writing ideas:1. Create an empty list, write the data that needs to be backed up to the list, and make it easy to call back.2, the establishment of backup storage directory.3. Call the OS module to read the data from the list and then call the tar command to back it up.#!/usr/bin/python#luohuiImport timeImport SysImport OSSOURCE =[]Backup_dir= '/backup 'Import OSSOURCE =[]Backup_dir= '/
To prevent damage to the database server, you need to back up data to the client every day. The data is stored in the export directory. The following is a backup script:
To prevent damage to the database server, you need to back up data to the client every day. The data is stored in the export directory. The following is a backup
Http://www.cnblogs.com/bruceleeliya/archive/2012/05/04/2482733.htmluse mysqldump to back up the database, upload to the backup server via FTP, and keep the backup files locally. Create a new Shell script filevi/home/work/backup.shAdd the following content:#! /bin/bashsqlbakname=_u1_sql_$ (date +%y%m%d). Tar.gzmysqldump--user=mysql_user1--password= "Your password"
In linux, the Web server backup and recovery script can be used in both centos and freebsd, but the variable TAR in the script to be modified is the tar command path of the system. The script is as follows:
In linux, the Web server backup and recovery
In the EBS oracle production environment, the database backup script is saved as the sh script respectively below. The first one is that the backup speed of the compressed backup is extremely slow, and it takes 10 hours to GB, however, after the
Implementation features: The Daily data (/www,/log) of client Server A is packaged locally, and the scheduled script is synchronized to the server on the server every day, and the backed up data is verified on the servers, and the results are sent to the administrator's mailbox. Client:#!/bin/bashremote_host=172.16.1.111 remote_path=/backup local_backup_path=/backuplocal_file_path=/data [-D $loc
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.