Provides various official and user-released code examples. For code reference, you are welcome to learn how to regularly back up MYSQL databases using crontab in linux.
You only need to follow the three steps below, and everything is under your control:
Step 1: configure the Backup Directory code on the server:
--------------------------------------------------------------------------------
mkdir /var/lib
Server more, the site is more and more, always feel not the whole backup heart, and there are several times RM operation errors, resulting in irreparable damage. And most VPS providers are not providing automatic backup functionality or this feature charges slightly higher prices. So it is necessary for me to put this work into practice, and maybe one day it will be used.
Use of the
1. Backing up a single databaseMysqldump-u Ymoa--opt--default-character-set=utf8-p ymoadb >/app/wodsy/backup/ymoadb.sqlMysqldump: Backup command-U: User name--opt: This option is shorthand, equivalent to specifying--add-drop-tables--add-locking--create-option--disable-keys--extended-insert-- Lock-tables--quick--set-charset. It can give a quick dump operation and generate a dump file that can be loaded into
First, the win system MySQL backup and restore:1, Backup:Start-and-run->cmd, go to the MySQL Bin folder:Mysqldump-u user name-p databasename >exportfilenameEnter a password to export the database.2, Restore:Enter the MySQL command line, "Mysql>", to create the database to restore:Create Database Databasesname;Go to the database you created, and restore:Use Databasename;source exportfilename;Ii. MySQL backup
the initiative to find files to back up, so cpio have to cooperate with similar to find the file name can be found instructions to tell Cpio where the data is backed up#cpio-OVCB > [file|device] #cpio-IVCDU #cpio-IVCT Options and parameters to be used for backup:-o: Data copy output to a file or appliance-B: Let the preset blocks can be added to 5120 bytes, the preset is the bytes, this is the advantage of allowing large files to store the speedSpeed
There are many ways to back up a database. the most common method is automatic and scheduled Database Backup. next I will introduce how to use shell scripts in linux to back up a MySQL database regularly.
There are many ways to back up a database. the most common method is automatic and scheduled Database Backup. next I will introduce how to use shell scripts in
Why should I back up the Linux system
An application of the Linux system, affected by the internal environment, the impact of the underlying hardware, the attack of foreign hackers, the problem is unavoidable, as a system management personnel, their own responsibility is not to ensure that the system will never have problems, in fact it is impossible, but in the system failure or collapse, To the fastest s
Welcome to the Linux community forum and interact with the 2 million technical staff to edit the script file [python] viewplaincopyprint? Db_userrootdb_passwd123456db_hostlocalhostbackup_dirusrlocalapache2htdocsbackuptime $ (date + % Y % m % d % H % M) MYSQLu
Welcome to the Linux community forum and interact with 2 million technicians> edit the script file [python] view plaincopyprint? Db_user = "root" db_p
One, installation part
Backup exec is a data protection product primarily for Windows platforms, but it also includes agents for Linux or UNIX. To understand which Linux or UNIX systems you are using for Backup Exec, visit the Software Compatibility List on the technical Support website, taking the be10d, which is cur
Whatever the system, the safest way. After debugging, make a backup. If you encounter any major problems, you can recover them directly, which is convenient and easy to handle. The following describes the Linux backup and recovery methods: the backup and recovery system is responsible for the
I. Prepare shell scripts
Vi/home/zhangy/database_bak.sh
#! /Bin/sh# File:/home/zhangy/database_bak.sh# Database info bakupmysql TANK 2009/11/04DB_USER = "root" # User NameDB_PASS = "*********" # PasswordDB_NAME = "myblog" # Name of the data to be backed up
DATE = 'date + % Y _ % m _ % d' # date to be backed upYESTERDAY = 'date-d yesterday + % Y _ % m _ % d' # Delete the backup from YESTERDAY
BIN_DIR = "/usr/local/mysql/bin"BCK_DIR = "/home/zhangy/data
Detailed description of data backup methods based on MySQL command line mode in Linux-6.5
Understanding:
Logical backup: only backup some data in the table that meets the price adjustment, not all data. However, the unique difference is that text information is exported, which obviously saves space than mysqldump
Linux: automatic backup of MySQL database and email sending, linuxmysql
Website data is the most important thing. We need to back up the data regularly. Next we will talk about it regularly-Automatically-back up the MySQL database, and compress the data to your mailbox.
The general steps are as follows:
1. Make sure that the sendmail and mutt packages are installed. (If the packages are not installed, insta
have been thinking about a problem recently, if hand shake accidentally execute command chmod 777-r/, just no system backup, it is really tragic. The backup of production system is really the most heavy.This session only discusses how to back up system file permissions.1. Create a file for testing.[email protected] ~]# ll testfacl.txt-rw-r--r--1 root root 0 Mar 05:27 testfacl.txtYou can see that the Testfac
The above describes the environment of Jenkins, due to server migration, we may often meet the important information on the backup server, if you do not want to spend too much effort to reconfigure Jenkins, then you can enter the following:1. Backing up Jenkins's configurationUnder the/root/.jenkins directory, use the TAR-CVF jenkins.tar. jenkins/* command to package all files in this directory. Then export to local (SZ file name: Export File/compress
I am the administrator of a small and medium-sized Linux website. The system architecture is RHEL 4.0 + PhP 4.3 + MySQL 4.03 + Apache 1.23. The average daily IP Access volume is 200, a typical small Linux website. Because it is a small website, there is no cost to use a tape drive for system backup, using a DVD Disc recorder + network hard disk. As
How to implement daily automatic backup of bitsCN.com for mysql databases in linux
How to implement daily automatic mysql database backup in linux
Create a backup folder:
Mkdir mysql_data_bak
Create a script file:
Touch autobackupmysql. sh
Open a file
Vi autobackup
Today, someone asked me to write a script that would allow Linux to regularly back up file data and delete backups over a certain period of time. It sounds interesting, but after some groping, it didn't work out. (because it is for the people who do not know Linux very well, so more detailed) look at the following: first, write a script
Write a script file that enables the script to perform a
Label:#想知道更多请查看第一版 "Linux C Database backup first Edition" 1#include 2#include 3#include 4#include 5#include string.h>6#include 7#include 8
9 //data table file to be backed up (one row for a database)
Ten #defineDb_file "./db_list" One //maximum number of databases that can be backed up
A #defineNUM 20 - //The maximum number of characters for a database name
- #defineLEN 128 the //to save a database read
Article Title: linux Rsync synchronization backup storage configuration tutorial. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Master server: 192.168.0.220 (CentOS 4.4)
Slave ser
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.