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!

/scripts/restorepkg behavior

Discussion in 'Data Protection' started by GOT, Jun 5, 2016.

  1. GOT

    GOT Get Proactive!
    PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    914
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    When using /scripts/restorepkg command to restore an account from a backup without terminating it first, does it do the following:

    Files in homedir (mail, public_html) that have been removed from the backup but still exist on the live site, are tehr emoved files removed, or do they remain?

    Databases that were dropped and do not not exist in the backup, are they dropped when restoring the account?

    I'm basically syncing backups from a production environment and restoring them on a standby server and I am wondering if I need to terminate the accounts first, or can I simply restore them with the --force option?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. GOT

    GOT Get Proactive!
    PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    914
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    Did some testing and deleted files in the backup are deleted from the userdir when restored, so that's good. Will be testing the databases over the next couple of days.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 24x7serversecurity

    24x7serversecurity Active Member

    Joined:
    Aug 31, 2015
    Messages:
    39
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hey :),

    When your restore any account using --force option, the account gets forcefully overwritten with all the files, databases etc. So if anything doesn't exist in the backup but exists in the account, will get deleted when your restore the account.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Documentation on /scripts/restorepkg is available at:

    Restore Package Script - Documentation - cPanel Documentation

    Using the --force flag restores the account, and any existing data remains intact on the server. Thus, it's likely a good idea to terminate the account first, then restore it, if you want it to completely match the backup archive contents.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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