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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Could not restore account issue

Discussion in 'Data Protection' started by dzung042, Sep 19, 2017.

Tags:
  1. dzung042

    dzung042 Registered

    Joined:
    Feb 10, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    After upgrade I have error restore account,
    "Could not restore account “uyozcizu”: Account Restore Failed: “The system could not load the cPanel user attributes file from the archive because of an error: (XID 98vm2v) The system failed to lock (LOCK_EX, LOCK_NB) the file “/backup/2017-09-18/accounts/cpanelpkgrestore.TMP.work.O3eDqQLI/safe_to_read_archive/contents/cp/uyozcizu” because of an error: Bad file descriptor at /usr/local/cpanel/Whostmgr/Transfers/Utils.pm line 234."
    Any one help me resolve
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you verify if the location of your backup directory is configured as a NFS mount?

    Thank you.
     
  3. feday2

    feday2 Registered

    Joined:
    Apr 5, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kiev, Ukraine
    cPanel Access Level:
    Root Administrator
    I have the same problem, and /backup/ - NFS mount disk.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Internal case CPANEL-14896 is open to report an issue where it's not possible to restore incremental backups from a NFSv4 mount. I'll monitor this case and update this thread with the outcome. In the meantime, a temporary workaround is to move the incremental backup directory that you want to restore outside of the NFS mount and restore it using a command like this:

    Code:
    /scripts/restorepkg /path/to/inremental/user/
    One additional workaround to consider is to set the NFS mount options to "local_lock=all,nolock" to see if that helps.

    Thank you.
     
  5. Intercloud

    Intercloud Registered

    Joined:
    Sep 25, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    DataCenter Provider
    Hi cPanelMichael,
    Even though I am using this forum for years, I have just created my first account solely to answer you.

    I am having the exact same problem with about 3 of my WHM servers (could be more, but these are the ones I found out about).

    The scenario in my case is a version 4 NFS server that is mounted to each of my WHM servers, and is used to save their backups that are created using WHM intergrated backup system. I am not using incremental backups but only full backups of all cPanel accounts.

    I also get this kind of message when trying to restore a backup:
    Could not restore account “rotemintercloud”: Account Restore Failed: “The system could not load the cPanel user attributes file from the archive because of an error: (XID k8mqzx) The system failed to lock (LOCK_EX, LOCK_NB) the file “/mnt/backup/2017-09-19/accounts/cpanelpkgrestore.TMP.work.lCXCWZG5/safe_to_read_archive/contents/cp/rotemintercloud” because of an error: Bad file descriptor at /usr/local/cpanel/Whostmgr/Transfers/Utils.pm line 234.


    I have also noticed that the WHM backup system's retention is no longer working and old backups are simply not being deleted.

    This issue has started about a month ago, following one of WHM's updates I believe. Seems like a bug to me since it worked perfectly in this exact way for years now (I have over 40 WHM servers that are configured in the exact same way).

    About your two temporary workaround:

    1. Copying the backup file localy and then running it using a script / "Restore a Full Backup/cpmove File" WHM tool is working perfectly, but it is not a solution since it is very time-consuming and my customers won't know how to do it themselves (They restore backups using WHM's web interface).

    2. Setting the NFS mount options to "local_lock=all,nolock" doesn't seem to be working on my case.

    3. Changing the mount's NFS version to 3 instead of 4 seem to be solving the problem completely, but I can only implement it to WHM servers that are mounted to one of my NFS servers that is supporting NFSv3 (I cannot change the other NFS server version since it is not supporting it).


    In conclusion, it seems to be a bug that have just recently started and should be fixed ASAP since it hurts backup retentions and restores.

    Thanks a lot for your attention and assistance on this matter.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  7. orudge

    orudge Member

    Joined:
    Oct 31, 2004
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    153
    Location:
    United Kingdom
    We are also experiencing this issue, which only started in the past month or so. We have backup servers mounted via NFS, and our clients are unable to restore backups due to a "The system failed to lock (LOCK_EX, LOCK_NB)" error. Altering the backup mount in fstab to the suggested line unfortunately does not help. Nor does using nfsvers=3.

    Perhaps the cPanel code could be altered to store the temporarily extracted data in a different location (e.g., /home)?

    Thanks,
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There's no update to report on the status of internal case CPANEL-14896 at this time. I'll continue to monitor the case and update this thread with more information as it becomes available. As far as a workaround, you should be able to move the backup archives to a non-NFS mount location and then proceed with the restore.

    Thank you.
     
Loading...

Share This Page