Portal Home > Knowledgebase > WHM-cPanel > Multiple Account Backup and Transfer via SSH


Multiple Account Backup and Transfer via SSH




Backup All cPanel Accounts via SSH
backup.sh

#!/bin/bash

ls -d a* | while read x; do

/scripts/pkgacct $x;

echo $x has been done;

done

Terminate All cPanel Accounts via SSH
terminate.sh

#!/bin/bash

ls -d * | while read x; do

/scripts/killacct $x;

echo $x has been done;

done

Copy Backup files to new server

scp cpmove-* root@IP:/home


Restore All cPanel Accounts via SSH
restore.sh

#!/bin/bash

for f in *.tar.gz;
do  

u=$(echo $f| cut -d'.' -f1);
x=$(echo $u| cut -c8-);

/scripts/restorepkg $x ;

echo $x has been done;

done




Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article


Powered by WHMCompleteSolution