AutoMySQLBackup 3.0 Bug:"du: WARNING: use --si, not -H"

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,高可用系列 2核4GB
简介:

案例环境:

操作系统版本: Red Hat Enterprise Linux Server release 5.7 64bit

数据库版本 : 5.6.19 MySQL Community Server

AutoMySQLBackup: Automysqlbackup-v3.0_rc6

 

案例场景:

AutoMySQLBackup 3.0版本备份时,出现告警错误“du: WARNING: use --si, not -H; the meaning of the -H option will soon change to be the same as that of --dereference-args (-D)” 具体信息请见下面:

 
==============================================================================
Total disk space used for backup storage...
Size - Location
1.8M /u01/db_backup/mysqlbackup/
 
==============================================================================
 
###### WARNING ######
Errors reported during AutoMySQLBackup execution.. Backup failed
Error log below..
du: WARNING: use --si, not -H; the meaning of the -H option will soon
change to be the same as that of --dereference-args (-D)
 
================================== End of Backup =============================
==============================================================================

 

出现这个错误是因为在 Red Hat Enterprise Linux 5.7上的du命令不符合POSIX标准规范。具体参考官方的AutoMySQLBackup 3.0 warning on du in Centos (5.7)

The POSIX specifications are. It seems, that the Centos 5.7 version of du is not POSIX compliant, but will soon be. I have done my best to use only POSIX compliant syntax to assure the bug-free running on most systems. Unfortunately, I can't take care of every system and distribution, which chooses to defy POSIX syntax. For other people and myself, it would be a good idea to get the options of du on Centos 5.7, so please post 'du --help'.

如下所示,在命令du --help中,你就能从帮助信息中看到下面信息:

clip_image001

 

可 以通过修改脚本/usr/local/bin/automysqlbackup 找到下面脚本,修改脚本将“ echo `du -hsH "${CONFIG_backup_dir}"` 修改为 echo `du -hs "${CONFIG_backup_dir}"` 即可解决问题。

clip_image002

 

在Red Hat Enterprise Linux Server release 6.6 就不会有这个问题,它的du版本为8.4, Red Hat Enterprise Linux 5.7上的du命令版本为du (GNU coreutils) 5.97

# du --version
du (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Written by Torbjörn Granlund, David MacKenzie, Paul Eggert,
and Jim Meyering.
相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
7月前
ORA-00600 [kwqitnmphe:ltbagi] Errors even after the fix for Bug 17831758 and Bug 18536720 is in place (Doc ID 2002540.1)
ORA-00600 [kwqitnmphe:ltbagi] Errors even after the fix for Bug 17831758 and Bug 18536720 is in place (Doc ID 2002540.1)
47 4
|
6月前
|
Java
Files.find 去除部分目录/dev/fd,/proc如何操作
在使用 `Files.find` 方法时,如果你想在搜索过程中排除特定目录,如 `/dev/fd` 和 `/proc`,可以在 `BiPredicate` 实现中添加相应的逻辑。以下是一个示例,演示如何在 `Files.find` 中排除这些目录: ```java import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributes; imp
|
7月前
|
Linux
嵌入式Linux系统(NUC980)tf卡出错处理errors=remount-ro改为errors=continue
嵌入式Linux系统(NUC980)tf卡出错处理errors=remount-ro改为errors=continue
155 1
|
缓存 Linux
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
533 0
未解决:dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/-1.diff.rm5mTN
未解决:dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/-1.diff.rm5mTN
125 0
|
编解码 Ubuntu Linux
Linux FrameBuffer(三)- struct fb_fix_screeninfo 和 struct fb_var_screeninfo 详解
Linux FrameBuffer(三)- struct fb_fix_screeninfo 和 struct fb_var_screeninfo 详解
493 0