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 Multiple Backups

Discussion in 'Data Protection' started by aldhy, Aug 9, 2014.

  1. aldhy

    aldhy Member

    Joined:
    Aug 9, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hello,

    how to restore multiple backups ?
    i want to move from reseller hosting to Dedicated Server... i only have cpmove file

    thank you
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey,

    - Move all those cpmove files to the new server using SCP
    - Prepare a file ( userlist.txt) which lists the account name's of the backup's ( one account name in one line )
    to be restored
    - Run this script in the dedicated server - for i in `cat userlist.txt`; do /scripts/restorepkg $i; done
     
    #2 triantech, Aug 10, 2014
    Last edited: Aug 10, 2014
    aldhy likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    The instructions in the previous post are sufficient if you only have the cpmove archives. Let us know if you encounter any difficulties with the process.

    Thank you.
     
  4. aldhy

    aldhy Member

    Joined:
    Aug 9, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    it's work
    thank you
     
  5. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hello,

    Great to know :)
     
  6. IndicHosts.net

    Joined:
    Mar 11, 2006
    Messages:
    22
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    We scp over +50 backup*.tar.gz archives and user a derived script which worked, wanted to share for record

    Code:
     screen; ls backup-*.gz /home > acct; for i in `cat acct`; do /scripts/restorepkg $i; done; rm acct
    
     
    aldhy likes this.
  7. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    It's not really necessary to create an acct file. You could just as easily run:

    Code:
    # screen; for i in `ls /home/backup-*.gz` ; do /scripts/restorepkg $i; done
    
    which should accomplish the same task.
     
    aldhy likes this.
  8. JustSomeGuy

    JustSomeGuy Active Member

    Joined:
    Oct 13, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Code:
    # screen; for i in `ls /home/backup-*.gz` ; do /scripts/restorepkg $i; done
    
    If I have all my backups as incremental inside /home3/incremental/accounts, what command would I use to restore 300+ sites. I wish CPanel would have an option to select all backups
    Thanks
     
    #8 JustSomeGuy, May 1, 2015
    Last edited: May 1, 2015
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You will need to compress the incremental backup directories for the accounts into individual archives if you want to restore them via the command line using the /scripts/restorepkg utility. Then, simply change "/home/backup-*.gz`" in the example to /home3/incremental/accounts/backup-*.gz`".

    Thank you.
     
  10. JustSomeGuy

    JustSomeGuy Active Member

    Joined:
    Oct 13, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    So far with my new box, I have one incremental backup and was able to run this to restore it onto the new server.

    Code:
    screen; for i in `ls -d *` ; do /scripts/restorepkg $i; done
     
Loading...

Share This Page