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.

legacy backups restore on new vps

Discussion in 'Data Protection' started by enxdtw, Aug 31, 2015.

  1. enxdtw

    enxdtw Registered

    Joined:
    Aug 31, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Hi

    I created a whm legacy backup by running the command

    sudo /scripts/cpbackup --force

    Since I choose the mysql and dir settings for all accounts I also backed up the user accounts

    The backup created backup files in /backup/cpbackup/daily including some tar.gz files for each of the user directories.

    ./ calendar.tar.gz dirs/ ines.tar.gz
    ../ cpbackupstatus.cfg eject.tar.gz simon.tar.gz
    altona.tar.gz dave.tar.gz files/

    My question is how do I restore using these files on my new VPS server, I guess I copy the files to the /backup/cpbackup/daily on the new server, however how do I restore, will WHM recognise the files in the directory, which settings page do I need to use and what do I put in the restore fields?

    Thanks

    Dave
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, You can restore your all these backups through WHH. Login your new VPS and enable your legacy backup. Once you enable it you can restore your all backup through WHM >> Backup >> Legacy Restore Multiple Backups

    Also you can restore your backup through command line using "/scripts/restorepkg /backup/cpbackup/daily/FILE-NAME.tar.gz" command.
     
  3. enxdtw

    enxdtw Registered

    Joined:
    Aug 31, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    The thing is that there is no single FILE-NAME.tar.gz in the directory backup/cpbackup/daily, there are compressed files for all the individual accounts and also a dir and file directory. Can you explain how this technique would work?

    I am hoping that the 'Legacy Restore Multiple Backups' is able to find and use the /backup/cpbackup/daily directory. So my plan is to ftp the /backup directory to the new VPS and then perform the backup using the Legacy Restore Multiple Backups technique. However I would like an alternative in the case that whm is unable to find the backup or complains about restoring from it.

    Cheers

    Dacve
     
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    Using for loop in your command you can restore your all backup files.You can save a list of full paths of each backup in a text file. For example at "/root/list_of_backups.txt" and then try with below command

    Code:
    for i in `cat /root/list_of_backups.txt`; do echo /scripts/restorepkg $i; done;
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, you could restore the backups through a command like the one in the previous response if you prefer to not use Web Host Manager.

    Thank you
     
  6. enxdtw

    enxdtw Registered

    Joined:
    Aug 31, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    it seems that the whm backup process does not restore certain linux system files, for instance the sudoers file was reset, is this correct?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The backups generated through the options in "WHM >> Backup Configuration" are designed to restore the accounts. Only certain system files are backed up, and those are only restored manually:

    cPanel - System Backups

    Thank you.
     
Loading...

Share This Page