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.

Restore 200+ fullbackup account on my WHM

Discussion in 'Data Protection' started by al_bozorgi, Nov 6, 2013.

  1. al_bozorgi

    al_bozorgi Member

    Joined:
    Nov 6, 2013
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hi,

    First sorry for my poor English.

    i move 200+ (about 205 account) to my server location ==> /home.

    all account generated by cpanel and name's equal "backup-{BACKUP-DATE_TIME}_{USER}.tar.gz".

    i have Root access and i install cpanel two day age and no account create on it (fresh cpanel server)

    my Question is : How can i Restore all account with one action ??

    i know whm have option "Restore a Full Backup/cpmove File" but this option can restore one account in time for another account muse type user account this is not good and waste my time.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You could try using a command like this to restore all accounts via SSH:

    Code:
    for i in `ls /home/*.tar.gz|cut -d \- -f 2 | cut -d . -f 1 `;do /scripts/restorepkg $i;done
    Note that you may want to run this command in a "screen" session as it may take a while to complete.

    Thank you.
     
  3. al_bozorgi

    al_bozorgi Member

    Joined:
    Nov 6, 2013
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you so much.

    i change your script cat result is not return correct value of user name then i change for these script and work correctly :

    Thank you again for fast replay and save my time.
     
  4. regulararticles

    regulararticles Registered

    Joined:
    Dec 5, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Restore multiple backup in one command ssh
    if the filename of the full backups varied, you could store a list of the full paths to each backup in a text file, such as a text file at "/root/list_of_backups.txt" and then the command could be altered as follows:

     
Loading...

Share This Page