Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'Data Protection' started by abdelhost77, Nov 16, 2018.

Tags:
  1. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    110
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    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.
     
  2. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,451
    Likes Received:
    178
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    Is the remote destination validated and enabled?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    110
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    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
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    110
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    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 ?
     
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 cPanelMichael, Nov 27, 2018
    Last edited: Dec 3, 2018
  8. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    110
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    Thanks @cPanelMichael
    But did not work when I choose :
    /../backup/
    It raise the error :
    You must enter a relative path.
     
  9. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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
     
  10. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Here's a screenshot of my correct directory setting before recent whm updates showing an error because of the first slash.

    On the other screenshot the error disappears when the first slash is removed but now the backups do not go to the external drive as needed.
     

    Attached Files:

  11. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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".
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #11 cPanelMichael, Nov 30, 2018
    Last edited: Dec 10, 2018
  12. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Root Administrator
    thanks for that update. I just tried your workaround and will report back later.
     
    cPanelMichael likes this.
  13. Monto

    Monto Member

    Joined:
    Jul 5, 2017
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    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.
     
  14. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,906
    Likes Received:
    127
    Trophy Points:
    368
    Location:
    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/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  16. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi @dalem,

    Thanks for the update. I've modified the suggested workaround in my earlier response.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Hello, any update on this issue? thanks
     
  18. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,153
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Morphime

    Morphime Member

    Joined:
    Feb 19, 2019
    Messages:
    9
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    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
     
  20. Morphime

    Morphime Member

    Joined:
    Feb 19, 2019
    Messages:
    9
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    markleman likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice