How to Restore CPanel multiple backups from SSH

is it possible to restore cpanel multiple backups from SSH? Yeah It is......

what i mean with backups is tar.gz files that is on cpbackups\daily directory.

cd /backup/cpbackup/daily; for a in *; do /scripts/restorepkg $a; sleep 30; done;
I'm sleeping 30 seconds in the above because I'm sleepy, if you are in a hurry to restore all then remove that command or change it to "sleep 1"

Script without sleep: for a in *; do /scripts/restorepkg $a;done;

How to copy cloudLinux Limits etc...

LVE limits are saved in /etc/container/ve.cfg, you can transfer this file to new server and to apply settings execute:
# lvectl apply all

In case you are using PHP Selector, all PHP Selector selector individual settings are stored in user /home directory (/home_userdir/username/.cl.selector), so you can transfer whole /home dir, and then simply install cagefs and PHP selector on a new machine.
and after migration you need to execute:

$ cagefsctl --setup-cl-selector
$ cagefsctl --cl-selector-reset-versions

All CageFS settings are located into /etc/cagefs directory.

Post a Comment