Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

automysqlbackup

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Roken
Posts: 89
Joined: 2011-02-06 01:12

automysqlbackup

#1 Post by Roken »

I've been around linux for a lot of years, and have two home machines on Arch, two rapsberry Pis, and the important machine, a VPS on Debian. I mention this only to show I have an idea of what I'm doing.

My VPS runs a server, and the sql DB is very important to it. It occasionally corrupts (reason not yet known) and so I decided to put a daily backup regime in place, and installed automysqlbackup.

If I launch it as a user, it fails with

Code: Select all

Could not open required defaults file: /etc/mysql/debian.cnf
If I launch with sudo, it works.

cron entries are in place, but are clearly not running as expected. How do I make this work automagically? I'm not massively familiar with the intricacies of cron.

/etc/crontab shows:

Code: Select all

# m h dom mon dow user	command
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
/etc/cron.daily/automysqlbackup

Code: Select all

#!/bin/sh
test -x /usr/sbin/automysqlbackup || exit 0
/usr/sbin/automysqlbackup
So all as root, but nada.

Please? Thank you in advance.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: automysqlbackup

#2 Post by bw123 »

I don't use it, but I like to help. The first thing I did is apt search and found that it is a debian pkg. I guess this is the ver you are using?

Code: Select all

automysqlbackup/stable 2.6+debian.4-1 all
  daily, weekly and monthly backup for your MySQL database
The next thing I did was highlight your error msg
"Could not open required defaults file: /etc/mysql/debian.cnf"
and right click on it and search and found a buttload of hits...

So I would suggest first you do a similar search.
resigned by AI ChatGPT

Post Reply