fails to copy my.cnf if it is a symlink

Bug #1714045 reported by Jay2k1
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Using mylvmbackup 0.15, if you for example set "mycnf=/etc/mysql/my.cnf" but that file is a symlink, like my.cnf -> /etc/alternatives/my.cnf, the operation fails with

Error: Could not copy /etc/mysql/my.cnf to /var/cache/mylvmbackup/mnt/backup-cnf-20170830_183218_mysql: File exists


lstat("/etc/mysql/my.cnf", {st_mode=S_IFLNK|0777, st_size=24, ...}) = 0
readlink("/etc/mysql/my.cnf", "/etc/alternatives/my.cnf", 4095) = 24
stat("/etc/alternatives/my.cnf", {st_mode=S_IFREG|0644, st_size=869, ...}) = 0
readlink("/etc/mysql/my.cnf", "/etc/alternatives/my.cnf", 4095) = 24
symlink("/etc/alternatives/my.cnf", "/var/cache/mylvmbackup/mnt/backup-cnf-20170830_183218_mysql") = -1 EEXIST (File exists)

Revision history for this message
Jay2k1 (info-jay2k1) wrote :

Further info: Debian Stretch seems to create the symlink. /etc/alternatives/my.cnf is another symlink, which points to /etc/alternatives/my.cnf.

Setting /etc/alternatives/my.cnf as mycnf in the config file produces the same error, setting /etc/alternatives/my.cnf works.

Revision history for this message
Jay2k1 (info-jay2k1) wrote :

Sorry, whatever went wrong there.
/etc/alternatives/my.cnf is a symlink that points to /etc/mysql/mariadb.cnf. The latter works in the config.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.