On Wed, 5 Jan 2011 14:52:51 +0100
Emmanuel Lacour <[email protected]> wrote:

>> You use logrotate to manage your mysqldumps!  Excellent idea.
> 
> if you are using Debian, the command "savelog" is also often
> convenient to rotate a file at the beginning or end of a script.
> 
> saveloq -q /var/backups/mysql/dump.sql.gz
> mysqldump ... | gzip -c > /var/backups/mysql/dump.sql.gz

Speaking about Debian, I would also add that there's no need to create
a special user to do backups as Debian already provides one with
sufficient privileges for maintenance purposes, so one can just pass
the relevant config file to various MySQL utilities, like this:

# mysqldump --defaults-file=/etc/mysql/debian.cnf --opt ... 

I'm quite sure other distros do something akin to this, so it could
probably be adapted.

Reply via email to