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!

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:
    13
    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:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. al_bozorgi

    al_bozorgi Member

    Joined:
    Nov 6, 2013
    Messages:
    13
    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:
    4
    Likes Received:
    0
    Trophy Points:
    51
    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

  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