In Progress [CPANEL-24094] Relative paths required for backup destinations

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Hi,
Backup type is incremental
Using resync option to remote destination.
Remote destination is validated
===> but backup is done locally and is not transferred to "remote destination"
Did I miss something ?

Here is the last part or the logs:

2018-11-16 09:06:46 +0100] info [backup] Queuing prune operation for remote destination daily backups
[2018-11-16 09:06:46 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:174
[2018-11-16 09:06:46 +0100] info [backup] leaving queue_backup_transport_item
[2018-11-16 09:06:46 +0100] info [backup] Queuing transport reporter
[2018-11-16 09:06:46 +0100] info [backup] no_transport = 0 .. and queueid = TQ:TaskQueue:175
[2018-11-16 09:06:46 +0100] info [backup] leaving queue_backup_transport_item
[2018-11-16 09:06:46 +0100] info [backup] Completed at Fri Nov 16 09:06:46 2018
[2018-11-16 09:06:46 +0100] info [backup] Final state is Backup::Success (0)
[2018-11-16 09:06:46 +0100] info [backup] Sent Backup::Success notification.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @abdelhost77,

Could you run the commands referenced below on the affected cPanel server and let us know the output?

Code:
cat /usr/local/cpanel/version
cat /var/cpanel/backups/config
cat /var/cpanel/backups/$$$.backup_destination
Replace "/$$$.backup_destination" with the actual file name associated with the remote backup destination on your system, and ensure to exclude the hostname, ID, and password from the output. Additionally, can you provide us with any error messages that appear in /usr/local/cpanel/logs/cpbackup_transporter.log during the most recent backup transport attempt?

Thank you.
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Thanks for feedback
yes Additional destinations is created and enabled
Looks like no error in the logs file, please see below outputs.

root# grep error /usr/local/cpanel/logs/cpbackup_transporter.log
root#

root# cat /usr/local/cpanel/version
11.76.0.7

root# cat /var/cpanel/backups/config
---
BACKUPACCTS: 'yes'
BACKUPBWDATA: 'no'
BACKUPDAYS: 1,3,5
BACKUPDIR: /backup2
BACKUPENABLE: 'yes'
BACKUPFILES: 'yes'
BACKUPLOGS: 'no'
BACKUPMOUNT: 'yes'
BACKUPSUSPENDEDACCTS: 'yes'
BACKUPTYPE: incremental
BACKUP_DAILY_ENABLE: 'yes'
BACKUP_DAILY_RETENTION: 1
BACKUP_MONTHLY_DATES: 1
BACKUP_MONTHLY_ENABLE: 'yes'
BACKUP_MONTHLY_RETENTION: 1
BACKUP_WEEKLY_DAY: 0
BACKUP_WEEKLY_ENABLE: 'no'
BACKUP_WEEKLY_RETENTION: 4
CHECK_MIN_FREE_SPACE: 1
DISABLE_METADATA: 'no'
ERRORTHRESHHOLD: 3
FORCE_PRUNE_DAILY: 0
FORCE_PRUNE_MONTHLY: 0
FORCE_PRUNE_WEEKLY: 0
GZIPRSYNCOPTS: --rsyncable
KEEPLOCAL: 1
LINKDEST: 0
LOCALZONESONLY: 'no'
MAXIMUM_RESTORE_TIMEOUT: 21600
MAXIMUM_TIMEOUT: 7200
MIN_FREE_SPACE: 5
MIN_FREE_SPACE_UNIT: percent
MYSQLBACKUP: accounts
POSTBACKUP: 'no'
PREBACKUP: -1
PSQLBACKUP: 'no'


root# cat /var/cpanel/backups/xxx.backup_destination
---
authtype: password
disabled: 0
host: <ip>
id: xxxxxx
name: xxxx
password: "xxxx"
path: backup/xxx/xxx
port: xxx
timeout: 30
type: Rsync
upload_system_backup: 0
username: root
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
root# grep error /usr/local/cpanel/logs/cpbackup_transporter.log
root#
Hello @abdelhost77,

Do you see any output at all in this log file during the backup attempt? Sometimes the culprit isn't identifiable with the "error" term.

Thank you.
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Hi @cPanelMichael

I think I find what happen ...
I was looking at the wrong path
Incremental Backups were copied to /root/backup/ instead of /backup
because Im allowed only to put relative path in backup incremental GUI
So how please to force the distant backup to be sent to /backup and not to /root/backup ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @abdelhost77,

The backup directory on remote systems is always created relative to the home directory of the logged in user on the remote system. Thus, you'll need to use a value like this for the backup directory when configuring the remote destination since your configured user is root:

Code:
/../backup/
Thank you.

Edit For Accuracy: This is no longer applicable as of cPanel & WHM version 76. See updated post here: In Progress - [CPANEL-24094] Relative paths required for backup destinations
 
Last edited:

hekg

Member
Nov 4, 2015
13
1
53
US
cPanel Access Level
Root Administrator
I just started having a problem backup up to external remote hard drive because of new 'must use relative path' rule.

My backups were working just fine until very recently where my remote backup location was set up like /Volumes/5TB-drive/whm-backups

I started to notice that my backups were no longer appearing in the usual place and it turned out to be that WHM backup config page no longer accepts the first /slash in the backup directory setting and returned a 'You must enter a relative path' error.

The problem now is that if I get rid of the first slash, then the backups will be sent to my primary hard drive in a new directory that the backup system creates called Mac-Drive/Volumes/5TB-drive/whm-backups.

As you can see, the backups are not being saved to the external drive but rather to the main internal drive of my Mac in a directory named the same as the one in the external drive that I need it to go to.

This is a new issue because I was alway having my backups go to the correct place on the 5tb external.

How can I set this up so that I can use my 'external drive' again and not my Mac's 'internal drive'?
thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
But did not work when I choose :
/../backup/
It raise the error :
You must enter a relative path.
I just started having a problem backup up to external remote hard drive because of new 'must use relative path' rule.
Hello,

As of cPanel & WHM version 76, it looks like it's no longer possible to enter an absolute path when configuring the remote destination via the Web Host Manager UI. Internal case CPANEL-24094 is open to report the affect this change is having on administrators. I'll monitor this case and update this thread with more information on it's status as it becomes available.

In the meantime, a workaround is to setup a symbolic link pointing the /root/$backup path on the destination server to the path of your preference. For example, to do this you'd run a command line this on the remote destination server:

Code:
ln -s /home/backup /root/backup
Let me know if the workaround helps.

Thank you.

Edit For Accuracy: Updated workaround. Updated sentence "it looks like it's no longer possible to enter a relative path" to "it looks like it's no longer possible to enter an absolute path".
 
Last edited:

Monto

Member
Jul 5, 2017
16
2
3
Australia
cPanel Access Level
Root Administrator
Hello,

I run 2 servers, one on cpanel v74, one on v76.

On the v74, setting up a remote backup destination is straightforward - '/backup' delivers to that directory, which is on a second (backup) drive on the other server.

However, on the v76, it demands relative paths (to the users home directory) so 'backup' (leading slashes give an error message) stores the remote backups in /root/backup, on the main drive and not the backup drive.

I have been advised by cpanel that I can mount the drive, but I wonder what the reasoning is behind the change? Makes it harder that it was, or still is on the older version.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Monto,

I've moved your post to this thread. I'll continue to monitor internal case CPANEL-24094 and update this thread with new information as it becomes available.

Thank you.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
Just a note the workaround does not work
Noticed that the cpanel remote backup system filed up a remote root partition & crashed it with out of disk space which is not where the backup is, it is on a its own drive mounted @ /backup

Best to put in a symbolic link from /root/
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hi @dalem,

Thanks for the update. I've modified the suggested workaround in my earlier response.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello, any update on this issue? thanks
This is tentatively set to be addressed as part of the work that's going into the case referenced on the thread below:

In Progress - [CPANEL-21358] Unable to validate rsync backup destination

We still don't have a definitive time frame to offer, but the case is receiving attention due to the amount of customer feedback we've received (as noted on the other thread). I'll continue to monitor both cases and merge the two threads once we confirm CPANEL-21358 will fix the issue reported on this thread as well.

Thank you.
 

Morphime

Member
Feb 19, 2019
9
2
3
Canada
cPanel Access Level
Root Administrator
Hi, i had some problems with my cpanel backups sinc ei upgraded to http2 and while debuging privileges i managed to make it work. The problem tho is that the sftp backup directory is relative to the home directory of the account and i cant make it save on the ftp partition already on my server.... it just create the path i had previously writen in the account's home directory which is not large enough

example:
backup directory: ftp/backup
saves to: /home/mybackupaccount/ftp/backup
path that it need to be saved: /ftp/backup

previous config: /ftp/backup (now doesnt work because of the begining / not beeing allowed)
saves to: /ftp/backup

Is there a special syntax i need to use to make it go out of the home directory?
I really need to fix this backup issue since its production server's backup