automysqlbackup and du warning “use –si”

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)

I updated my copy of automysqlbackup and started to get the error above. automysqlbackup doesn’t get a lot of active traffic ? the last update was 2011-08-19. A bug report (#3489668) mentions this but it was submitted 2012-02-20. So, I am not holding my breath on a new release. Based on the bug report, here’s the diff patch.

< echo `du -hsH “${CONFIG_backup_dir}”`

> echo `du -hs –si “${CONFIG_backup_dir}”`

Simply search for line 1972 (or du -hsH) and replace it with the last line above.

NB. The code gets munged a bit. There are 2 dashes before the si.

Bash Script Variables


Posted in one place for future reference.

  • $* - All variables as a single string/word
  • $@ - All variables but each is a separate string
  • $# - The number of arguments given
  • $0 - the name of the script
  • $1-9 - Reference each argument by number
  • $- - Flags passed to the script
  • $! - PID of last job in the background
  • $_ - The final argument of the previous command
  • $? - Exit status of the last command, function, or script
  • $$ - PID of the script