CPbackup /var/lib/mysql empty tar.

ChrisAk

Member
Jul 9, 2014
6
0
1
cPanel Access Level
Root Administrator
Hello,

I have scheduled my backups to run daily and also backup system dirs.
I noticed that under /home/backup/2014-07-08/system/dirs the _var_lib_mysql_.tar.gz is created empty.
Are there any log files on this to see why this happens?
Also i've set to transfer backups to remote host but i noticed that only the user account backups are transfered and not the system dirs. I can't seem to find an option to transfer system dirs too, is this the defauly behavior? Any way to change this?

Thanks in advance!
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hello,

Can you please review the backup logs with /usr/local/cpanel/logs/cpbackup/ directory and FTP backup activity logs in /usr/local/cpanel/logs/cpbackup_transporter.log file
 

ChrisAk

Member
Jul 9, 2014
6
0
1
cPanel Access Level
Root Administrator
I have these in my log:
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: /var/cpanel/dnsadmin/sock: socket ignored
/bin/gtar: Removing leading `/' from hard link targets
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
/bin/gtar: Removing leading `/' from member names
[backup] System backups will not be uploaded to any remote destinations
Afterwards there are individual account backups. No mention about what's doing on system dirs and why system backups will not be uploaded to any remote destinations.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

System backups are not uploaded to remote destinations by default. You have to enable that manually per the instructions at:

Remote System Backups

Note that you may want to see if the MySQL directory backs up successfully on the next backup generation.

Thank you.
 

ChrisAk

Member
Jul 9, 2014
6
0
1
cPanel Access Level
Root Administrator
Hello Michael and thanks for the reply!
I added "upload_system_backup: 1" as suggested in the configuration file and now it uploads system dirs to remote location too.
Problem is i still have problem with /var/lib/mysql which is tared empty, also i now get this error
/bin/gtar: /var/cpanel: file changed as we read it
[backup] Failed to perform full backup of /var/cpanel/ to /home/backup/2014-07-18/system/dirs/_var_cpanel.tar.gz
Any suggestions?
 

ChrisAk

Member
Jul 9, 2014
6
0
1
cPanel Access Level
Root Administrator
So after a small investigation i found out that /var/lib/mysql is a symlink to /home/mysql. Could someone please tell me where is the backup script so i can change the mysql location to /home/mysql so it takes the backup? Atm it backups only the symlink and not the actual directory. Need to add -h option to tar or replace the symlink dir with the actual location of it.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
It's not possible to modify the backup script to change how it handles symlinks. You can submit a bug report for the issue with symbolic link backing up instead of the MySQL directory via:

Submit A Bug Report

Feel free to post the ticket number here so we can update this thread with the outcome.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
To update, it was suggested to update the data directory in the /etc/my.cnf file as a workaround.

Thank you.