検索

bitsCN.com

xtrabackup-2.1.2-611下载链接:

wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.2/binary/Linux/x86_64/percona-xtrabackup-2.1.2-611.tar.gz

安装编译所需的依赖包

yum install libaio libaio-devel perl-Time-HiRes curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel perl-ExtUtils-MakeMaker perl-DBD-MySQL.* package -y

tar xvf percona-xtrabackup-2.1.2-611.tar.gz

cd /percona-xtrabackup-2.1.2/bin/

[root@CcTalk-DB bin]# ll

total 112420

-rwxr-xr-x 1 root root   110729 May 18 08:00 innobackupex

lrwxrwxrwx 1 root root       12 Aug 23 13:25 innobackupex-1.5.1 -> innobackupex

-rwxr-xr-x 1 root root  2211237 May 18 08:00 xbcrypt

-rwxr-xr-x 1 root root  2285672 May 18 08:00 xbstream

-rwxr-xr-x 1 root root 13033745 May 18 08:00 xtrabackup

-rwxr-xr-x 1 root root 16333506 May 18 07:26 xtrabackup_55

-rwxr-xr-x 1 root root 80988093 May 18 07:44 xtrabackup_56

[root@CcTalk-DB bin]# 

3.将innobackupex、xtrabackup等文件copy到mysql程序目录下/bin、目录

cp * /usr/local/mysql/bin/

4.将mysql安装目录下的文件做软链接到/usr/bin/目录下。这个比变量方便,这样就完成了部署安装!!!

ln -s /usr/local/mysql/bin/* /usr/bin/

5.验证:

执行如下命令按 tab 键能够自动关联补全为安装成功!

[root@slave1 ~]# innobackupex

innobackupex        innobackupex-1.5.1  

 

[root@slave1 ~]# xtrabackup

xtrabackup     xtrabackup_55  xtrabackup_56 

[root@CcTalk-DB bin]# innobackupex --help

Options:

    --apply-log

        Prepare a backup in BACKUP-DIR by applying the transaction log file

        named "xtrabackup_logfile" located in the same directory. Also,

        create new transaction logs. The InnoDB configuration is read from

        the file "backup-my.cnf".

 

 

    --compact

        Create a compact backup with all secondary index pages omitted. This

        option is passed directly to xtrabackup. See xtrabackup

        documentation for details.

 

 

    --compress

        This option instructs xtrabackup to compress backup copies of InnoDB

        data files. It is passed directly to the xtrabackup child process.

        Try 'xtrabackup --help' for more details.

 

 

    --compress-threads

        This option specifies the number of worker threads that will be used

        for parallel compression. It is passed directly to the xtrabackup

        child process. Try 'xtrabackup --help' for more details.

 

 

    --compress-chunk-size

        This option specifies the size of the internal working buffer for

        each compression thread, measured in bytes. It is passed directly to

        the xtrabackup child process. Try 'xtrabackup --help' for more

        details.

 

 

    --copy-back

        Copy all the files in a previously made backup from the backup

        directory to their original locations.

 

 

    --databases=LIST

        This option specifies the list of databases that innobackupex should

        back up. The option accepts a string argument or path to file that

        contains the list of databases to back up. The list is of the form

        "databasename1[.table_name1] databasename2[.table_name2] . . .". If

        this option is not specified, all databases containing MyISAM and

        InnoDB tables will be backed up. Please make sure that --databases

        contains all of the InnoDB databases and tables, so that all of the

        innodb.frm files are also backed up. In case the list is very long,

        this can be specified in a file, and the full path of the file can

        be specified instead of the list. (See option --tables-file.)

 

 

    --debug-sleep-before-unlock=SECONDS

        This is a debug-only option used by the XtraBackup test suite.

 

 

    --defaults-file=[MY.CNF]

        This option specifies what file to read the default MySQL options

        from. The option accepts a string argument. It is also passed

        directly to xtrabackup's --defaults-file option. See the xtrabackup

        documentation for details.

 

 

    --defaults-extra-file=[MY.CNF]

        This option specifies what extra file to read the default MySQL

        options from before the standard defaults-file. The option accepts a

        string argument. It is also passed directly to xtrabackup's

        --defaults-extra-file option. See the xtrabackup documentation for

        details.

 

 

    --encrypt=ENCRYPTION_ALGORITHM

        This option instructs xtrabackup to encrypt backup copies of InnoDB

        data files using the algorithm specified in the

        ENCRYPTION_ALGORITHM. It is passed directly to the xtrabackup child

        process. Try 'xtrabackup --help' for more details.

 

 

    --encrypt-key=ENCRYPTION_KEY

        This option instructs xtrabackup to use the given ENCRYPTION_KEY

        when using the --encrypt option. It is passed directly to the

        xtrabackup child process. Try 'xtrabackup --help' for more details.

 

 

    --encrypt-key-file=ENCRYPTION_KEY_FILE

        This option instructs xtrabackup to use the encryption key stored in

        the given ENCRYPTION_KEY_FILE when using the --encrypt option. It is

        passed directly to the xtrabackup child process. Try 'xtrabackup

        --help' for more details.

 

 

    --encrypt-threads

        This option specifies the number of worker threads that will be used

        for parallel encryption. It is passed directly to the xtrabackup

        child process. Try 'xtrabackup --help' for more details.

 

 

    --encrypt-chunk-size

        This option specifies the size of the internal working buffer for

        each encryption thread, measured in bytes. It is passed directly to

        the xtrabackup child process. Try 'xtrabackup --help' for more

        details.

 

 

    --export

        This option is passed directly to xtrabackup's --export option. It

        enables exporting inpidual tables for import into another server.

        See the xtrabackup documentation for details.

 

 

    --extra-lsndir=DIRECTORY

        This option specifies the directory in which to save an extra copy

        of the "xtrabackup_checkpoints" file. The option accepts a string

        argument. It is passed directly to xtrabackup's --extra-lsndir

        option. See the xtrabackup documentation for details.

 

 

    --galera-info

        This options creates the xtrabackup_galera_info file which contians

        the local node state at the time of the backup. Option should be

        used when performing the backup of Percona-XtraDB-Cluster.

 

 

    --help

        This option displays a help screen and exits.

 

 

    --host=HOST

        This option specifies the host to use when connecting to the

        database server with TCP/IP. The option accepts a string argument.

        It is passed to the mysql child process without alteration. See

        mysql --help for details.

 

 

    --ibbackup=IBBACKUP-BINARY

        This option specifies which xtrabackup binary should be used. The

        option accepts a string argument. IBBACKUP-BINARY should be the

        command used to run XtraBackup. The option can be useful if the

        xtrabackup binary is not in your search path or working directory.

        If this option is not specified, innobackupex attempts to determine

        the binary to use automatically. By default, "xtrabackup" is the

        command used. However, when option --copy-back is specified,

        "xtrabackup_51" is the command used. And when option --apply-log is

        specified, the binary is used whose name is in the file

        "xtrabackup_binary" in the backup directory, if that file exists.

 

 

    --include=REGEXP

        This option is a regular expression to be matched against table

        names in databasename.tablename format. It is passed directly to

        xtrabackup's --tables option. See the xtrabackup documentation for

        details.

 

 

    --incremental

        This option tells xtrabackup to create an incremental backup, rather

        than a full one. It is passed to the xtrabackup child process. When

        this option is specified, either --incremental-lsn or

        --incremental-basedir can also be given. If neither option is given,

        option --incremental-basedir is passed to xtrabackup by default, set

        to the first timestamped backup directory in the backup base

        directory.

 

 

    --incremental-basedir=DIRECTORY

        This option specifies the directory containing the full backup that

        is the base dataset for the incremental backup. The option accepts a

        string argument. It is used with the --incremental option.

 

 

    --incremental-dir=DIRECTORY

        This option specifies the directory where the incremental backup

        will be combined with the full backup to make a new full backup. The

        option accepts a string argument. It is used with the --incremental

        option.

 

 

    --incremental-force-scan

        This options tells xtrabackup to perform full scan of data files for

        taking an incremental backup even if full changed page bitmap data

        is available to enable the backup without the full scan.

 

 

    --log-copy-interval

        This option specifies time interval between checks done by log

        copying thread in milliseconds.

 

 

    --incremental-lsn

        This option specifies the log sequence number (LSN) to use for the

        incremental backup. The option accepts a string argument. It is used

        with the --incremental option. It is used instead of specifying

        --incremental-basedir. For databases created by MySQL and Percona

        Server 5.0-series versions, specify the LSN as two 32-bit integers

        in high:low format. For databases created in 5.1 and later, specify

        the LSN as a single 64-bit integer.

 

 

    --move-back

        Move all the files in a previously made backup from the backup

        directory to the actual datadir location. Use with caution, as it

        removes backup files.

 

 

    --no-lock

        Use this option to disable table lock with "FLUSH TABLES WITH READ

        LOCK". Use it only if ALL your tables are InnoDB and you DO NOT CARE

        about the binary log position of the backup. This option shouldn't

        be used if there are any DDL statements being executed or if any

        updates are happening on non-InnoDB tables (this includes the system

        MyISAM tables in the mysql database), otherwise it could lead to an

        inconsistent backup. If you are considering to use --no-lock because

        your backups are failing to acquire the lock, this could be because

        of incoming replication events preventing the lock from succeeding.

        Please try using --safe-slave-backup to momentarily stop the

        replication slave thread, this may help the backup to succeed and

        you then don't need to resort to using this option.

 

 

    --no-timestamp

        This option prevents creation of a time-stamped subdirectory of the

        BACKUP-ROOT-DIR given on the command line. When it is specified, the

        backup is done in BACKUP-ROOT-DIR instead.

 

 

    --parallel=NUMBER-OF-THREADS

        This option specifies the number of threads the xtrabackup child

        process should use to back up files concurrently. The option accepts

        an integer argument. It is passed directly to xtrabackup's

        --parallel option. See the xtrabackup documentation for details.

 

 

    --password=WORD

        This option specifies the password to use when connecting to the

        database. It accepts a string argument. It is passed to the mysql

        child process without alteration. See mysql --help for details.

 

 

    --port=PORT

        This option specifies the port to use when connecting to the

        database server with TCP/IP. The option accepts a string argument.

        It is passed to the mysql child process. It is passed to the mysql

        child process without alteration. See mysql --help for details.

 

 

    --rebuild-indexes

        This option only has effect when used together with the --apply-log

        option and is passed directly to xtrabackup. When used, makes

        xtrabackup rebuild all secondary indexes after applying the log.

        This option is normally used to prepare compact backups. See the

        XtraBackup manual for more information.

 

 

    --rebuild-threads

        This option only has effect when used together with the --apply-log

        and --rebuild-indexes option and is passed directly to xtrabackup.

        When used, xtrabackup processes tablespaces in parallel with the

        specified number of threads when rebuilding indexes. See the

        XtraBackup manual for more information.

 

 

    --redo-only

        This option should be used when preparing the base full backup and

        when merging all incrementals except the last one. This option is

        passed directly to xtrabackup's --apply-log-only option. This forces

        xtrabackup to skip the "rollback" phase and do a "redo" only. This

        is necessary if the backup will have incremental changes applied to

        it later. See the xtrabackup documentation for details.

 

 

    --rsync

        Uses the rsync utility to optimize local file transfers. When this

        option is specified, innobackupex uses rsync to copy all non-InnoDB

        files instead of spawning a separate cp for each file, which can be

        much faster for servers with a large number of databases or tables.

        This option cannot be used together with --stream.

 

 

    --safe-slave-backup

        Stop slave SQL thread and wait to start backup until

        Slave_open_temp_tables in "SHOW STATUS" is zero. If there are no

        open temporary tables, the backup will take place, otherwise the SQL

        thread will be started and stopped until there are no open temporary

        tables. The backup will fail if Slave_open_temp_tables does not

        become zero after --safe-slave-backup-timeout seconds. The slave SQL

        thread will be restarted when the backup finishes.

 

 

    --safe-slave-backup-timeout

        How many seconds --safe-slave-backup should wait for

        Slave_open_temp_tables to become zero. (default 300)

 

 

    --slave-info

        This option is useful when backing up a replication slave server. It

        prints the binary log position and name of the master server. It

        also writes this information to the "xtrabackup_slave_info" file as

        a "CHANGE MASTER" command. A new slave for this master can be set up

        by starting a slave server on this backup and issuing a "CHANGE

        MASTER" command with the binary log position saved in the

        "xtrabackup_slave_info" file.

 

 

    --socket=SOCKET

        This option specifies the socket to use when connecting to the local

        database server with a UNIX domain socket. The option accepts a

        string argument. It is passed to the mysql child process without

        alteration. See mysql --help for details.

 

 

    --stream=STREAMNAME

        This option specifies the format in which to do the streamed backup.

        The option accepts a string argument. The backup will be done to

        STDOUT in the specified format. Currently, the only supported

        formats are tar and xbstream. This option is passed directly to

        xtrabackup's --stream option.

 

 

    --tables-file=FILE

        This option specifies the file in which there are a list of names of

        the form database. The option accepts a string argument.table, one

        per line. The option is passed directly to xtrabackup's

        --tables-file option.

 

 

    --throttle=IOS

        This option specifies a number of I/O operations (pairs of

        read+write) per second. It accepts an integer argument. It is passed

        directly to xtrabackup's --throttle option.

 

 

    --tmpdir=DIRECTORY

        This option specifies the location where a temporary file will be

        stored. The option accepts a string argument. It should be used when

        --stream is specified. For these options, the transaction log will

        first be stored to a temporary file, before streaming. This option

        specifies the location where that temporary file will be stored. If

        the option is not specified, the default is to use the value of

        tmpdir read from the server configuration.

 

 

    --use-memory=B

        This option accepts a string argument that specifies the amount of

        memory in bytes for xtrabackup to use for crash recovery while

        preparing a backup. Multiples are supported providing the unit (e.g.

        1MB, 1GB). It is used only with the option --apply-log. It is passed

        directly to xtrabackup's --use-memory option. See the xtrabackup

        documentation for details.

 

 

    --user=NAME

        This option specifies the MySQL username used when connecting to the

        server, if that's not the current user. The option accepts a string

        argument. It is passed to the mysql child process without

        alteration. See mysql --help for details.

 

 

    --defaults-group=GROUP-NAME

        This option specifies the group name in my.cnf which should be used.

        This is needed for mysqld_multi deployments.

 

 

    --version

        This option displays the xtrabackup version and copyright notice and

        then exits.

 

 

[root@CcTalk-DB bin]# 

 

 

 

 

bitsCN.com
声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
MySQLでスロークエリを識別して最適化する方法は? (スロークエリログ、Performance_schema)MySQLでスロークエリを識別して最適化する方法は? (スロークエリログ、Performance_schema)Apr 10, 2025 am 09:36 AM

MySQLスロークエリを最適化するには、slowquerylogとperformance_schemaを使用する必要があります。1。LowerQueryLogを有効にし、しきい値を設定して、スロークエリを記録します。 2。performance_schemaを使用してクエリの実行の詳細を分析し、パフォーマンスのボトルネックを見つけて最適化します。

MySQLおよびSQL:開発者にとって不可欠なスキルMySQLおよびSQL:開発者にとって不可欠なスキルApr 10, 2025 am 09:30 AM

MySQLとSQLは、開発者にとって不可欠なスキルです。 1.MYSQLはオープンソースのリレーショナルデータベース管理システムであり、SQLはデータベースの管理と操作に使用される標準言語です。 2.MYSQLは、効率的なデータストレージと検索機能を介して複数のストレージエンジンをサポートし、SQLは簡単なステートメントを通じて複雑なデータ操作を完了します。 3.使用の例には、条件によるフィルタリングやソートなどの基本的なクエリと高度なクエリが含まれます。 4.一般的なエラーには、SQLステートメントをチェックして説明コマンドを使用することで最適化できる構文エラーとパフォーマンスの問題が含まれます。 5.パフォーマンス最適化手法には、インデックスの使用、フルテーブルスキャンの回避、参加操作の最適化、コードの読み取り可能性の向上が含まれます。

MySQL非同期マスタースレーブレプリケーションプロセスを説明してください。MySQL非同期マスタースレーブレプリケーションプロセスを説明してください。Apr 10, 2025 am 09:30 AM

MySQL非同期マスタースレーブレプリケーションにより、BINLOGを介したデータの同期が可能になり、読み取りパフォーマンスと高可用性が向上します。 1)マスターサーバーレコードはBinlogに変更されます。 2)スレーブサーバーは、I/Oスレッドを介してBINLOGを読み取ります。 3)サーバーSQLスレッドは、BINLOGを適用してデータを同期させます。

MySQL:簡単な学習のためのシンプルな概念MySQL:簡単な学習のためのシンプルな概念Apr 10, 2025 am 09:29 AM

MySQLは、オープンソースのリレーショナルデータベース管理システムです。 1)データベースとテーブルの作成:createdatabaseおよびcreateTableコマンドを使用します。 2)基本操作:挿入、更新、削除、選択。 3)高度な操作:参加、サブクエリ、トランザクション処理。 4)デバッグスキル:構文、データ型、およびアクセス許可を確認します。 5)最適化の提案:インデックスを使用し、選択*を避け、トランザクションを使用します。

MySQL:ユーザーフレンドリーなデータベースの紹介MySQL:ユーザーフレンドリーなデータベースの紹介Apr 10, 2025 am 09:27 AM

MySQLのインストールと基本操作には、次のものが含まれます。1。mysqlをダウンロードしてインストールし、ルートユーザーパスワードを設定します。 2。sqlコマンドを使用して、createdatabaseやcreateTableなどのデータベースとテーブルを作成します。 3. CRUD操作を実行し、挿入、選択、更新、コマンドを削除します。 4.パフォーマンスを最適化し、複雑なロジックを実装するためのインデックスとストアドプロシージャを作成します。これらの手順を使用すると、MySQLデータベースをゼロから構築および管理できます。

InnoDBバッファープールはどのように機能し、なぜパフォーマンスに不可欠なのですか?InnoDBバッファープールはどのように機能し、なぜパフォーマンスに不可欠なのですか?Apr 09, 2025 am 12:12 AM

Innodbbufferpoolは、データとインデックスページをメモリにロードすることにより、MySQLデータベースのパフォーマンスを向上させます。 1)データページは、ディスクI/Oを削減するためにBufferPoolにロードされます。 2)汚れたページは、定期的にディスクにマークされ、リフレッシュされます。 3)LRUアルゴリズム管理データページの排除。 4)読み出しメカニズムは、可能なデータページを事前にロードします。

MySQL:初心者向けのデータ管理の容易さMySQL:初心者向けのデータ管理の容易さApr 09, 2025 am 12:07 AM

MySQLは、インストールが簡単で、強力で管理しやすいため、初心者に適しています。 1.さまざまなオペレーティングシステムに適した、単純なインストールと構成。 2。データベースとテーブルの作成、挿入、クエリ、更新、削除などの基本操作をサポートします。 3.参加オペレーションやサブクエリなどの高度な機能を提供します。 4.インデックス、クエリの最適化、テーブルパーティション化により、パフォーマンスを改善できます。 5。データのセキュリティと一貫性を確保するために、バックアップ、リカバリ、セキュリティ対策をサポートします。

MySQLでインデックスを使用するよりも、フルテーブルスキャンがいつ速くなるのでしょうか?MySQLでインデックスを使用するよりも、フルテーブルスキャンがいつ速くなるのでしょうか?Apr 09, 2025 am 12:05 AM

完全なテーブルスキャンは、MySQLでインデックスを使用するよりも速い場合があります。特定のケースには以下が含まれます。1)データボリュームは小さい。 2)クエリが大量のデータを返すとき。 3)インデックス列が高度に選択的でない場合。 4)複雑なクエリの場合。クエリプランを分析し、インデックスを最適化し、オーバーインデックスを回避し、テーブルを定期的にメンテナンスすることにより、実際のアプリケーションで最良の選択をすることができます。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

DVWA

DVWA

Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強力な PHP 統合開発環境