数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?

news2024/10/6 14:28:09

数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?

昨天在Linux 服务器上做了一个的mysql数据库备份,备份很重要关键时候能救命。具体怎么备份这边就不多说了。文件已经免费上传了

https://download.csdn.net/download/t631048648/88756279?spm=1001.2014.3001.5503

具体的操作想看潇湘隐者同学的文章

https://www.cnblogs.com/kerrycode/p/4648974.html

。## 标题Dependency programs are missing. mysql ……underfind.

今天上去查看备份目录发现是空的,这边贴上 /etc/automysqlbackup/automysqlbackup.conf 配置

	#version=3.0_rc2
	# DONT'T REMOVE THE PREVIOUS VERSION LINE!
	#
	# Uncomment to change the default values (shown after =)
	# WARNING:
	# This is not true for UMASK, CONFIG_prebackup and CONFIG_postbackup!!!
	#
	# Default values are stored in the script itself. Declarations in
	# /etc/automysqlbackup/automysqlbackup.conf will overwrite them. The
	# declarations in here will supersede all other.
	# Edit $PATH if mysql and mysqldump are not located in /usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin
    # Basic Settings
	# use encrypted authentication credentials
	# yes: through login path
	# no: through username and password
	#CONFIG_mysql_dump_encrypted_login='no'
	
	# since mysql 5.6.x connections can be stored securely
	# add your connection with
	# mysql_config_editor set --login-path=automysqldump --host=localhost --user=root --password
	# automysqldump is using the login-path "automysqldump" as default
	#CONFIG_mysql_dump_login_path='automysqldump'
	
	# Path to the mysql login configuration file.
	# Sometimes if the script is running in a cronjob, the mysql login configuration file cannot be located.
	# I.e. set it to '/root/.mylogin.cnf' or '/home/username/.mylogin.cnf'
	#CONFIG_mysql_dump_login_path_file=''
	
	# Username to access the MySQL server e.g. dbuser
	CONFIG_mysql_dump_username='root'
	
	# Password to access the MySQL server e.g. password
	CONFIG_mysql_dump_password='xxx'
	
	# Host name (or IP address) of MySQL server e.g localhost
	CONFIG_mysql_dump_host='xxxx'
	
	# "Friendly" host name of MySQL server to be used in email log
	# if unset or empty (default) will use CONFIG_mysql_dump_host instead
	#CONFIG_mysql_dump_host_friendly=''
	
	# Backup directory location e.g /backup
	CONFIG_backup_dir='/var/backup/db'
	
	# This is practically a moot point, since there is a fallback to the compression
	# functions without multicore support in the case that the multicore versions aren't
	# present in the system. Of course, if you have the latter installed, but don't want
	# to use them, just choose no here.
	# pigz -> gzip
	# pbzip2 -> bzip2
	# xz -T -> xz
	#CONFIG_multicore='yes'
	
	# Number of threads (= occupied cores) you want to use. You should - for the sake
	# of the stability of your system - not choose more than (#number of cores - 1).
	# Especially if the script is run in background by cron and the rest of your system
	# has already heavy load, setting this too high, might crash your system. Assuming
	# all systems have at least some sort of HyperThreading, the default is 2 threads.
	# If you wish to let pigz and pbzip2 autodetect or use their standards, set it to
	# 'auto'.
	#CONFIG_multicore_threads=2
	
	# Databases to backup
	
	# List of databases for Daily/Weekly Backup e.g. ( 'DB1' 'DB2' 'DB3' ... )
	# set to (), i.e. empty, if you want to backup all databases
	CONFIG_db_names=()
	# You can use
	#declare -a MDBNAMES=( "${DBNAMES[@]}" 'added entry1' 'added entry2' ... )
	# INSTEAD to copy the contents of $DBNAMES and add further entries (optional).
	
	# List of databases for Monthly Backups.
	# set to (), i.e. empty, if you want to backup all databases
	#CONFIG_db_month_names=()
	
	# List of DBNAMES to EXLUCDE if DBNAMES is empty, i.e. ().
	CONFIG_db_exclude=( 'performance_schema' 'information_schema' )
	
	# List of DBNAMES patterns to EXLUCDE if DBNAMES is empty, i.e. ().
	CONFIG_db_exclude_pattern=('blade')
	
	# List of tables to exclude, in the form db_name.table_name
	# You may use wildcards for the table names, i.e. 'mydb.a*' selects all tables starting with an 'a'.
	# However we only offer the wildcard '*', matching everything that could appear, which translates to the
	# '%' wildcard in mysql.
	CONFIG_table_exclude=('nonmotor.non_motor_pass*')
	
	
	# Advanced Settings
	
	# Rotation Settings
	
	# Which day do you want monthly backups? (01 to 31)
	# If the chosen day is greater than the last day of the month, it will be done
	# on the last day of the month.
	# Set to 0 to disable monthly backups.
	CONFIG_do_monthly='01'
	
	# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
	# Set to 0 to disable weekly backups.
	CONFIG_do_weekly='5'
	
	# Set rotation of daily backups. VALUE*24hours
	# If you want to keep only today's backups, you could choose 1, i.e. everything older than 24hours will be removed.
	CONFIG_rotation_daily=6
	
	# Set rotation for weekly backups. VALUE*24hours
	CONFIG_rotation_weekly=35
	
	# Set rotation for monthly backups. VALUE*24hours
	CONFIG_rotation_monthly=150
	
	
	# Server Connection Settings
	
	# Set the port for the mysql connection
	CONFIG_mysql_dump_port=13306
	
	# Compress communications between backup server and MySQL server?
	#CONFIG_mysql_dump_commcomp='no'
	
	# Use ssl encryption with mysqldump?
	CONFIG_mysql_dump_usessl='no'
	
	# For connections to localhost. Sometimes the Unix socket file must be specified.
	#CONFIG_mysql_dump_socket=''
	
	# The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)
	#CONFIG_mysql_dump_max_allowed_packet=''
	
	# This option sends a START TRANSACTION SQL statement to the server before dumping data. It is useful only with
	# transactional tables such as InnoDB, because then it dumps the consistent state of the database at the time
	# when BEGIN was issued without blocking any applications.
	#
	# When using this option, you should keep in mind that only InnoDB tables are dumped in a consistent state. For
	# example, any MyISAM or MEMORY tables dumped while using this option may still change state.
	#
	# While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents and
	# binary log coordinates), no other connection should use the following statements: ALTER TABLE, CREATE TABLE,
	# DROP TABLE, RENAME TABLE, TRUNCATE TABLE. A consistent read is not isolated from those statements, so use of
	# them on a table to be dumped can cause the SELECT that is performed by mysqldump to retrieve the table
	# contents to obtain incorrect contents or fail.
	#CONFIG_mysql_dump_single_transaction='no'
	
	# http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html#option_mysqldump_master-data
	# --master-data[=value]
	# Use this option to dump a master replication server to produce a dump file that can be used to set up another
	# server as a slave of the master. It causes the dump output to include a CHANGE MASTER TO statement that indicates
	# the binary log coordinates (file name and position) of the dumped server. These are the master server coordinates
	# from which the slave should start replicating after you load the dump file into the slave.
	#
	# If the option value is 2, the CHANGE MASTER TO statement is written as an SQL comment, and thus is informative only;
	# it has no effect when the dump file is reloaded. If the option value is 1, the statement is not written as a comment
	# and takes effect when the dump file is reloaded. If no option value is specified, the default value is 1.
	#
	# This option requires the RELOAD privilege and the binary log must be enabled.
	#
	# The --master-data option automatically turns off --lock-tables. It also turns on --lock-all-tables, unless
	# --single-transaction also is specified, in which case, a global read lock is acquired only for a short time at the
	# beginning of the dump (see the description for --single-transaction). In all cases, any action on logs happens at
	# the exact moment of the dump.
	# ==================================================================================================================
	# possible values are 1 and 2, which correspond with the values from mysqldump
	# VARIABLE=    , i.e. no value, turns it off (default)
	#
	#CONFIG_mysql_dump_master_data=
	
	# Included stored routines (procedures and functions) for the dumped databases in the output. Use of this option
	# requires the SELECT privilege for the mysql.proc table. The output generated by using --routines contains
	# CREATE PROCEDURE and CREATE FUNCTION statements to re-create the routines. However, these statements do not
	# include attributes such as the routine creation and modification timestamps. This means that when the routines
	# are reloaded, they will be created with the timestamps equal to the reload time.
	#
	# If you require routines to be re-created with their original timestamp attributes, do not use --routines. Instead,
	# dump and reload the contents of the mysql.proc table directly, using a MySQL account that has appropriate privileges
	# for the mysql database.
	#
	# This option was added in MySQL 5.0.13. Before that, stored routines are not dumped. Routine DEFINER values are not
	# dumped until MySQL 5.0.20. This means that before 5.0.20, when routines are reloaded, they will be created with the
	# definer set to the reloading user. If you require routines to be re-created with their original definer, dump and
	# load the contents of the mysql.proc table directly as described earlier.
	#
	#CONFIG_mysql_dump_full_schema='yes'
	
	# Backup status of table(s) in textfile. This is very helpful when restoring backups, since it gives an idea, what changed
	# in the meantime.
	#CONFIG_mysql_dump_dbstatus='yes'
	
	# Backup dump settings
	
	# Include CREATE EVENT in backup?
	#CONFIG_mysql_dump_create_event='yes'
	
	# Include CREATE DATABASE in backup?
	#CONFIG_mysql_dump_create_database='no'
	
	# Include DROP DATABASE in backup?
	#CONFIG_mysql_dump_add_drop_database='no'
	
	# Separate backup directory and file for each DB? (yes or no)
	#CONFIG_mysql_dump_use_separate_dirs='yes'
	
	# Choose Compression type. (gzip, bzip2 or xz)
	CONFIG_mysql_dump_compression='gzip'
	
	# Use hex-blob for backup?
	#CONFIG_mysql_dump_hex_blob='no'
	
	# Store an additional copy of the latest backup to a standard
	# location so it can be downloaded by third party scripts.
	#CONFIG_mysql_dump_latest='no'
	
	# Remove all date and time information from the filenames in the latest folder.
	# Runs, if activated, once after the backups are completed. Practically it just finds all files in the latest folder
	# and removes the date and time information from the filenames (if present).
	#CONFIG_mysql_dump_latest_clean_filenames='no'
	
	# Create differential backups. Master backups are created weekly at #$CONFIG_do_weekly weekday. Between master backups,
	# diff is used to create differential backups relative to the latest master backup. In the Manifest file, you find the
	# following structure
	# $filename 	md5sum	$md5sum	diff_id	$diff_id	rel_id	$rel_id
	# where each field is separated by the tabular character '\t'. The entries with $ at the beginning mean the actual values,
	# while the others are just for readability. The diff_id is the id of the differential or master backup which is also in
	# the filename after the last _ and before the suffixes begin, i.e. .diff, .sql and extensions. It is used to relate
	# differential backups to master backups. The master backups have 0 as $rel_id and are thereby identifiable. Differential
	# backups have the id of the corresponding master backup as $rel_id.
	#
	# To ensure that master backups are kept long enough, the value of $CONFIG_rotation_daily is set to a minimum of 21 days.
	#
	#CONFIG_mysql_dump_differential='no'
	
	
	# Notification setup
	
	# What would you like to be mailed to you?
	# - log   : send only log file
	# - files : send log file and sql files as attachments (see docs)
	# - stdout : will simply output the log to the screen if run manually.
	# - quiet : Only send logs if an error occurs to the MAILADDR.
	CONFIG_mailcontent='stdout'
	
	# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
	#CONFIG_mail_maxattsize=4000
	
	# Allow packing of files with tar and splitting it in pieces of CONFIG_mail_maxattsize.
	#CONFIG_mail_splitandtar='yes'
	
	# Use uuencode instead of mutt. WARNING: Not all email clients work well with uuencoded attachments.
	#CONFIG_mail_use_uuencoded_attachments='no'
	
	# Email Address to send mail to? (user@domain.com)
	CONFIG_mail_address='xxxx@qq.com'
	
	
	# Encryption
	
	# Do you wish to encrypt your backups using openssl?
	#CONFIG_encrypt='no'
	
	# Choose a password to encrypt the backups.
	#CONFIG_encrypt_password='password0123'
	
	# Other
	
	# Backup local files, i.e. maybe you would like to backup your my.cnf (mysql server configuration), etc.
	# These files will be tar'ed, depending on your compression option CONFIG_mysql_dump_compression compressed and
	# depending on the option CONFIG_encrypt encrypted.
	#
	# Note: This could also have been accomplished with CONFIG_prebackup or CONFIG_postbackup.
	#CONFIG_backup_local_files=()
	
	# Command to run before backups (uncomment to use)
	#CONFIG_prebackup='/etc/mysql-backup-pre'
	
	# Command run after backups (uncomment to use)
	#CONFIG_postbackup='/etc/mysql-backup-post'
	
	# Uncomment to activate! This will give folders rwx------
	# and files rw------- permissions.
	#umask 0077
	
	# dry-run, i.e. show what you are gonna do without actually doing it
	# inactive: =0 or commented out
	# active: uncommented AND =1
	#CONFIG_dryrun=1

初步检查没有什么大问题,监测了一下定时任务
# crontab -l
在这里插入图片描述
定时任务没啥问题。决定通过执行备份命令方式进行排查问题
# /usr/local/bin/automysqlbackup /etc/automysqlbackup/automysqlbackup.conf
界面提示:automysqlback- Error: Dependency programs are missing. mysql ……
应该是automysqlbackup启动程序没有找到mysql.

数当时建数据库用的是docker 容器的方式进行安装的,本地没有初始化导致MySQL没有将路径放在/usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin

解决思路:

1.先查服务器的mysql 通过命令
#ps -ef | grep mysqldump
2.查看docker
#docker ps 
3.全局查到 通过find 命令查找mysqldump
# find / -name 'mysqldump'

在这里插入图片描述
4.编辑/etc/automysqlbackup/automysqlbackup.conf 通过修改里面的path
在这里插入图片描述

注:if mysql and mysqldump are not located in /usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin 这边其实有告诉我们如果msyql安装时没有将文件初始化到/usr/local/时可自行调整到指定目录。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1400461.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

数据结构【DS】Ch8 排序

文章目录 插入排序选择排序归并&基数外部排序 插入排序 交换排序 选择排序 归并&基数 外部排序

注解实现校验接口传参是否超出取值范围

文章目录 1、定义注解2、使用注解3、其余校验实现思路2.04、其余校验实现思路3.0 写接口,Dto里很多字段要检验传参范围,自定义个注解来校验。 1、定义注解 注解定义代码: import javax.validation.Constraint; import javax.validation.Con…

QT上位机开发(MySql访问)

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing @163.com】 网上介绍的关于QT和mysql部分的内容,都是利用Qt自带的mysql库来实现数据读写的。但是事实上来说,即使不用qt带的库,不用odbc,直接使用mysql安装包自带的lib库和dll库,也是可以…

Unity 面试篇|(九)操作系统与网络篇 【全面总结 | 持续更新】

目录 1. 客户端与服务器交互方式有几种?2. OSI七层模型有哪些,每一层的作用3. UDP/TCP含义,区别4. TCP/IP协议栈各个层次及分别的功能?5. 写出WWW的几个方法?6. Socket粘包7. Socket的封包、拆包8. Socket 客户端 队列…

kotlin $ (字符串模版)的使用

$ 在kotlin 中当做字符串模版使用,作用就是在字符串里面识别自己定义的字符 例如打印一个字符 这个时候编译就提示我们使用字符串模版的是个 $ 的作用就是识别字符串里面的i 字数有点少了,在写一个demo private fun String.appendArchive(): String …

Python小项目:还在为备份烦恼?这个tkinter项目帮你解决!

文章目录 1 引言2 Tkinter概览3 设计备份软件的界面4 文件夹选择逻辑5 备份方案介绍5.1 完全备份5.2 增量备份5.3 镜像备份 完整代码: import tkinter as tk from tkinter import filedialog, messagebox import os import shutil import filecmpdef choose_source(…

【git分支管理策略】

文章目录 前言一、分支管理策略简介二、git基本操作三、git分支远程分支本地分支 四、gitflow分支管理策略分支定义gitflow分支管理策略评价 五、GITHUB FLOW分支管理策略分支使用流程创建分支(Create a branch)新增提交(add and commit)提出 Pull 请求&…

快速上手的AI工具-文心3.5vs文心4.0

前言 大家好晚上好,现在AI技术的发展,它已经渗透到我们生活的各个层面。对于普通人来说,理解并有效利用AI技术不仅能增强个人竞争力,还能在日常生活中带来便利。无论是提高工作效率,还是优化日常任务,AI工…

TCP服务器的演变过程:C++使用libevent库开发服务器程序

C使用libevent库开发服务器程序 一、引言二、libevent简介三、Libevent库的封装层级3.1、reactor对象封装struct event_base3.2、事件对象struct event3.3、struct bufferevent对象3.4、evconnlistener对象3.5、事件循环3.6、事件处理 四、完整示例代码小结 一、引言 手把手教…

基于springboot的一个IT人才招聘网站系统源码+数据库+部署文档,公司可以发布岗位需求,求职者查找岗位并递交简历等

介绍 实现一个IT人才招聘系统,公司可以发布岗位需求,求职者查找岗位并递交简历等 启动 1. 主要技术版本 技术名称版本SpringBoot2.5.0MySQL8.0Redis6.2.0 2. 本地启动部署 2.1 数据库数据源部署 src/main/resources/application.yaml 配置文件&am…

C++入门学习(一)写一个helloworld

1、头文件 #include <iostream> using namespace std; 任何程序都需要这两句的&#xff0c;写上就好。 2、主文件 int main() {cout<<"Hello World!"<<endl;return 0; } 由于是int型数据&#xff0c;所以要返回一个值&#xff0c;即return0。…

如何在Mac上安装PHP环境

前置环境&#xff1a;HomeBrew # Homebrew 是 Mac 上最好的包管理器之一&#xff0c;可以用于安装各种开源软件。从 Terminal&#xff08;终端&#xff09;执行以下命令安装 Homebrew&#xff1a; /usr/bin/ruby -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/i…

保姆级最新版Kali虚拟机安装和汉化中文教程

Kali虚拟机简介 Kali虚拟机是一款基于Debian的Linux发行版虚拟机操作系统&#xff0c;专为安全渗透测试和数字取证而设计。该虚拟机预装了许多渗透测试软件&#xff0c;包括Metasploit、BurpSuite、sqlmap、nmap以及Cobalt Strike等&#xff0c;这些工具都是为了进行网络安全测…

Go后端开发 -- 反射reflect 结构体标签

Go后端开发 – 反射reflect && 结构体标签 文章目录 Go后端开发 -- 反射reflect && 结构体标签一、反射reflect1.编程语言中反射的概念2.interface 和反射3.变量内置的pair结构4.reflect的基本功能TypeOf和ValueOf5.从relfect.Value中获取接口interface的信息6…

初识HarmonyOS

文章目录 本章节目标一、 HarmonyOS简介初识HarmonyOSHarmonyOS系统定位HarmonyOS典型应用场景 二、HarmonyOS架构与安全1. HarmonyOS架构解析内核层系统服务层框架层应用层应用服务智能分发 2. HarmonyOS系统安全正确的人正确的设备正确地使用数据 三、HarmonyOS关键特性1. 硬…

M1 MacOS下安卓虚拟化的最佳方案

categories: [VM] tags: MacOS VM 写在前面 一直想在桌面环境虚拟化安卓app, 但是看网上的推荐一直感觉不合胃口, 不是要花钱就是有广告, 想着找找开源的实现, 后来发现还是 Google 自家的产品用着舒服. 安装与配置 brew install android-studio然后随便开一个项目, 选默认…

JavaWeb-Filter

一、概念 Filter&#xff1a;过滤器&#xff0c;JavaWeb三大组件&#xff08;Servlet&#xff0c;Filter&#xff0c;Listener&#xff09;之一。作用是把对资源的请求拦截下来&#xff0c;从而实现一些特殊的功能。一般完成一些通用的操作&#xff0c;比如&#xff1a;权限控…

[全连接神经网络]Transformer代餐,用MLP构建图像处理网络

一、MLP-Mixer 使用纯MLP处理图像信息&#xff0c;其原理类似vit&#xff0c;将图片进行分块(patch)后展平(fallten)&#xff0c;然后输入到MLP中。理论上MLP等价于1x1卷积&#xff0c;但实际上1x1卷积仅能结合通道信息而不能结合空间信息。根据结合的信息不同分为channel-mixi…

移动机器人规划 - 基于采样的路径搜索

0 预备知识 基于采样的规划器&#xff1a; &#xff08;1&#xff09;不要试图显示地构造C空间及其边界 &#xff08;2&#xff09;只需要简单的机器人配置是否发生碰撞 &#xff08;3&#xff09;利用简单的碰撞测试&#xff0c;充分了解空间 &#xff08;4&#xff09;碰撞检…

UKP3d的管道编辑

山西这家用户在使用UKP3d时&#xff0c;提出以下问题&#xff1a; 1、stp导入的模型怎么测量距离&#xff1b;另外需要把某一个点移动至原点坐标&#xff0c;这个怎么操作呢&#xff1f; 回复&#xff1a;dist&#xff08;主要是捕捉点&#xff0c;推荐使用&#xff08;开启精…