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!

File and Directory Restoration - mail dir not visible

Discussion in 'Data Protection' started by phil99, Mar 20, 2019.

  1. phil99

    phil99 Member

    Joined:
    Jun 10, 2018
    Messages:
    23
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi

    I have enabled daily backups in WHM > Backup > Backup Configuration (for one account only). The backups are working successfully.

    However, when I go to WHM > Backup File and Directory Restoration (or the same from the account's cPanel), when I browse the files, the mail directory is not shown (neither is the .cpanel directory).

    The mail directory is being backed up, because it is in the tar.gz file. (For reference mail is not in the global exclude file and the account's exclude file is empty.)

    Is this by design? If so could you explain why please?

    Thanks
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @phil99

    The mail should most certainly be included in a backup unless it's explicitly excluded. How are you viewing the contents of the backup and are you sure that hidden files are being shown?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,877
    Likes Received:
    482
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I see the same. Left side in the screenshot is FTP view, right, Directory Restoration screen in WHM.

    missingdirectories.jpg
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I see now, mail isn't actually missing from the backup. The file and directory restoration feature does not by default allow you to restore mail, that's best done through cPanel>>Files>>Backup Wizard -> Restore

    This was a result of the internal case CPANEL-17927 which was resolved in v72 of cPanel.I do see that none of the documentation details this and I'm opening a documentation case to have that issue resolved.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Infopro likes this.
  5. phil99

    phil99 Member

    Joined:
    Jun 10, 2018
    Messages:
    23
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi Lauren

    Thanks for the updates. As you say, this isn't mentioned in the main Backup documentation, though on further digging, I did find slightly obscure references to it, though with no explanation at [1] and [2]:

    "Note: The backups_create_metadata script will generate metadata for all directories under the /home/username directory, except for the /mail and /.cpanel directories."

    Unless I'm mistaken, the cPanel > Files > Backup Wizard > Restore does not provide the same functionality:

    1. It only allows you restore the whole Home Directory.
    2. You can only select a file from your own PC, not a backup file created by Backup that is stored on the server.

    So it would appear that the only way to restore only the mail directory from the Backup-created files is to manually extract the tar.gz file and copy the files across.

    I don't know the reason why this was disabled because of CPANEL-17927, but this seems like a significant omission. Would it be possible to at least have restoration of the mail directory as an option?

    Thanks

    [1] How to Manage Metadata Settings - cPanel Knowledge Base - cPanel Documentation
    [2] The backups_create_metadata Script - Version 78 Documentation - cPanel Documentation
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    You're correct it's mentioned only briefly in a few places, and not on the file/directory restore documentation. The initial issue was that the backup metadata was causing significant load times along with some other issues when large quantities of mail were included so the decision was to remove them from the metadata and that's where the internal case I mentioned comes into play but it should have also been included in the documentation.

    It doesn't you're correct, it'll restore the entire home dir.


    Correct, If restoring the home dir isnt what you want, the mail is present in the archive along with the .cpanel folder but you'd have to restore it manually
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. phil99

    phil99 Member

    Joined:
    Jun 10, 2018
    Messages:
    23
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks for the explanation.
     
    cPanelLauren 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