Restore 200+ fullbackup account on my WHM
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 : [COLOR="#B22222">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.
-
Hello :) You could try using a command like this to restore all accounts via SSH: 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.0 -
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 : [QUOTE][COLOR="#0000FF">for i in `ls /home/*.tar.gz|cut -f3 -d'_'|cut -f1 -d'.'`;do /scripts/restorepkg $i;done
Thank you again for fast replay and save my time.0 -
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: [QUOTE]# for x in $(cat /root/list_of_backups.txt); do echo /scripts/restorepkg $x; done; 0
Please sign in to leave a comment.
Comments
3 comments