After doing a clean install of Mac OS X Lion, I proceeded to install AutoMySQLbackup for an cloud based union management system I maintain.
The first hint that something was wrong was how quick the script ran through, almost instantaneously. I then got an error code:
/usr/local/mysql/bin/automysqlbackup.sh: line 507: -user=username: command not found
Username of course being the real username. After some research, I found Lion has changed the way paths are done. There is now a /etc/paths file to add universal paths.
So here is the new steps to get AutoMySQLbackup up and running on OS X 10.7 Lion.
Download MySQL Community Server and install.
Download AutoMySQLbackup from http://sourceforge.net/projects/automysqlbackup/files/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/ (make sure you download and install the 2.5.x version and not the 3.x beta version; the beta version does not work yet on OS X)
Create a /etc/automysqlbackup directory.
Copy the automysqlbackup.sh file to /usr/local/mysql/bin and make executable (chmod a+x).
Add "/usr/local/mysql" path to /etc/paths.
Copy out the conf settings and change according to your own needs; save to /etc/automysqlbackup/automysqlbackup.conf.
The automysqlbackup.sh.plist should be in /Library/LaunchDaemons/ OR use Lingon to add to launchd and execute everyday.
Also posted to http://soarhevn.blogspot.com/2011/09/using-automysqlbackup-on-os-x-lion.html
Okay … I have never used OS X. Could somebody please confirm that the 3.x scripts don't run under OS X? Version of OS X, errors and perhaps suggestions on how to fix them - insight into how OS X works differently from "normal" linux.
I cannot comment on 10.7 but the current 3.0 rc6 version runs under mac OS X 10.6.8 . The shellscript for installation however does not.
I didn't look into it and installed manually.
I think the problem is that Mac OS X has its own way to toss some directories around like etc, which is just a subdirectory of /private while there is a link to /private/etc in the root directory
So in a terminalsession or remote by ssh you always get to /etc just as expected by cd /etc .
So to install automysqlbackup just follow the instructions in the readme file.
Mac OS X 10.7, MySQL 5.5 - the script works fine in most cases. There's one error in the script WRT backup_local_files - the test for files to backup is inverted. Need to exclude information_schema AND performance_schema to prevent errors.