Restore website in cyberpanel without leaving the desktop
After creating a website backup on cyberpanel
Execute on your desktop
movebk
Now restore website on CyberPanel
Create movebk like this:
sudo nano /usr/local/bin/movebk
#!/bin/sh
echo "Enter exact domain/subdomain name to be moved to /home/backup"
read domain
FILE=/home/$domain/backup/*.tar.gz
echo "Enter user password and enter. Then enter root password and enter"
echo "ENTER to continue"
ssh -p 60022 -t
# credit: https://serverfault.com/questions/1111963/execute-root-commands-through-ssh-user
sudo chmod +x /usr/local/bin/movebk
Obs: change user, domain and port to your script
# credit: https://serverfault.com/questions/1111963/execute-root-commands-through-ssh-user
If your not create regular user and use only root, change script to
echo "Enter exactly domain/subdomain name to be moved to /home/backup"
read domain
FILE=/home/$domain
ssh -p 60022 -t
Obs: Dont try this
Comments and suggestions below.
Comments powered by CComment