mysqldump の警告を修正(Warning: Using unique option prefix event instead of events is deprecated and will be removed in a future release. Please use the full name instead.)

mysql のバックアップ時に警告が出ているのに気づきました.

Warning: Using unique option prefix event instead of events is deprecated and will be removed in a future release. Please use the full name instead.

メッセージで検索するとちょっと前のリリースノートにそれらしいものが.

Previously, program options could be specified in full or as any unambiguous prefix. For example, the –compress option could be given to mysqldump as –compr, but not as –comp because the latter is ambiguous. Option prefixes now are deprecated. They can cause problems when new options are implemented for programs. A prefix that is currently unambiguous might become ambiguous in the future. If an unambiguous prefix is given, a warning now occurs to provide feedback. For example: Warning: Using unique option prefix compr instead of compress is deprecated and will be removed in a future release. Please use the full name instead. Option prefixes are no longer supported in MySQL 5.7; only full options are accepted. (Bug #16996656) MySQL :: MySQL 5.6 Release Notes :: Changes in MySQL 5.6.13 (2013-07-31)

オプションを省略したりすると警告を出すようになったよ.5.7から使えなくなるよ.ということのようです.

バックアップはssh 経由のリモートで取得していて, ~/.ssh/authorized_keys に以下のような感じで書いていました.

command="/usr/bin/mysqldump --defaults-file=/home/user/.my.cnf --opt --all-databases --event | /usr/bin/xz -9",from="nnn.nnn.nnn.nnn",no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding ecdsa-sha2-nistp521 AAAA...

–event 部分は本来は –events の様なので以下のように修正して解決しました.

command="/usr/bin/mysqldump --defaults-file=/home/user/.my.cnf --opt --all-databases --events | /usr/bin/xz -9",from="nnn.nnn.nnn.nnn",no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding ecdsa-sha2-nistp521 AAAA...

#ちなみに受け側はこんな感じ 2 13 * * * /usr/bin/ssh -q -p nnnnn -i /home/user/.ssh/id_ecdsa-mysql-backup user@server > /backup/server/db/`/bin/date +\%Y\%M\%d_\%H:\%m:\%S_\%s_$$`.sql.xz`

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です