automysqlbackup

Kernels & Hardware, configuring network, installing services

automysqlbackup

Postby Roken » 2018-04-30 20:06

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.
Roken
 
Posts: 78
Joined: 2011-02-06 01:12

Re: automysqlbackup

Postby bw123 » 2018-04-30 23:39

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.
User avatar
bw123
 
Posts: 2988
Joined: 2011-05-09 06:02
Location: TN_USA


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable