Page 1 of 10

SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Thu Mar 31, 2016 8:03 pm
by skamasle
First as I say always sorry for my bad english
-----------------------


Edit**********

Image
Image

Beta 0.5.x

- Check if rsync and file are installed
- Improve mysql function
- Add support for all mysql versions supported by vestacp ( mysql 5.7 in ubuntu 16 etc )
- Restore SSL if ca-bundle is available
--- 0.5.3
- Restore user account password
- Restore MX records from backup (optional if yun whit MX )


Beta 0.4.x

- Improve database restore, now is compatible whit more cPanel backups, fix some bugs when database dont have Grant ALL Privileges.
- Improve database privileges restauration, now only was restored real database privileges, skip cPanel main user privileges, and a lot of grant all privileges added by cPanel when account was migrated to orther server.
- Adding debug mode.
- Some bugs was fixed.
- Bugs fixed, bad permisions on some files after restore.


Beta 0.3.6

- Improve some functions, get real cPanel user.
- Improve data base restore, fix bugs when database not exists
- Fix some bugs
- Dont restore database if is already created.

Beta 0.3.5

- Restore cPanel user.
- Restore websites, subdomains, domains, main domain
- Fix main domain restoring, skip public_html dirs if are used by domains or subdomains and this are currently restored
- Restore mails if cPanel backup use dovecot
- Restore data bases
- Add file count to show user some progress when extract backup and restore domain files.

Working in:

Cron restore
Restore databases whitout prefix.

##################
May not work when
: cPanel data base prefix disabled ( easy to fix but not do it yet )
: Mails restored only when have dovecot ( most cpanel have dovecot by default )
: CronJobs not restored yet
: Vestacp default package is needit, so if you dont have default package because you delete it or rename it you need or create package in vestacp -> packages or edit script beta0.4 open it and go to line 22 and define what package you want use by editing sk_vesta_package=default ( change default by your package name )


Info en espaƱol -> https://www.skamasle.com/migration-tool ... n-vestacp/

Download and run:

########################################
This script is provided at no cost and without warranty
run at your own risk.

########################################
Beta 0.5

Code: Select all

cd /root

wget http://mirror.skamasle.com/vestacp/skcpanelimporter/sk_importer_beta0.5.sh

bash sk_importer_beta0.5.sh backup-4.4.2016_09-06-38_user.tar.gz
If you want conserve your MX records ( help if you use mails in remove server as google apps, office 365, yandex etc )

Code: Select all

cd /root

wget http://mirror.skamasle.com/vestacp/skcpanelimporter/sk_importer_beta0.5.sh

bash sk_importer_beta0.5.sh backup-4.4.2016_09-06-38_user.tar.gz MX 
Beta 0.4

Code: Select all

cd /root

wget http://mirror.skamasle.com/vestacp/skcpanelimporter/sk_importer_beta0.4.sh

bash sk_importer_beta0.4.sh backup-4.4.2016_09-06-38_user.tar.gz
Beta 0.3.6

Code: Select all

cd /root

wget http://mirror.skamasle.com/vestacp/skcpanelimporter/sk_importer_beta0.3.5.sh

bash sk_importer_beta0.3.5.sh backup-4.4.2016_09-06-38_user.tar.gz
Hope help some body, am not a programer, so this may have bugs, you can report any troble on this post and I try fix it or help when have some time.

Now you can forked it from github

https://github.com/Skamasle/sk-import-c ... rter-05.sh

You can download latest from github

Code: Select all

https://raw.githubusercontent.com/Skamasle/sk-import-cpanel-backup-to-vestacp/master/sk-cpanel-importer-05.sh

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Fri Apr 01, 2016 5:47 am
by leisegang
You should add the restoration of mail. To me thats important and one of the hardest things to do when moving from cpanel.

Files and db is easy!

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Fri Apr 01, 2016 7:14 am
by skamasle
leisegang wrote:You should add the restoration of mail. To me thats important and one of the hardest things to do when moving from cpanel.

Files and db is easy!
Yes am working on it :)

I do some test and backup converter is easyest than a direct importer, so convert backup to vestacp style and then restore is more easy to get mails working.

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Fri Apr 01, 2016 7:41 am
by leisegang
i think that a import of a "full" backup is easier than a "direct transfer" in the WHM panel.

Also transferring a zip file with wget is easy. And the import i guess will be a v-import-account type of script in CLI or are you adding a web interface?

Interface would be awesome, but cli is good too :)

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Fri Apr 01, 2016 12:39 pm
by skamasle
Hi

I need say sorry for my last coment

I take a closer look to mails, and I can say than is easier restore mails from cpanel than restore databases, databases need a lot of work for get it working 100% and 100% compatible.

leisegang wrote:i think that a import of a "full" backup is easier than a "direct transfer" in the WHM panel.

Also transferring a zip file with wget is easy. And the import i guess will be a v-import-account type of script in CLI or are you adding a web interface?

Interface would be awesome, but cli is good too :)
Am working on cli only, script take an argument ( path to backup file ) and restore it.

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Sat Apr 02, 2016 8:24 pm
by skamasle
I update this.

Importer working better today :)

Beta 02,
Improve domains importing
Importing all mails accounts whit mails fully working :)


Image
Image

TODO

- Improve database restore
- Restore crons - low priority
- Restore SSL - low priority

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Sat Apr 02, 2016 9:06 pm
by amitz
Great work :)

Would like to test also.

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Sat Apr 02, 2016 10:32 pm
by imperio
skamasle, thank you for your help

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Mon Apr 04, 2016 1:58 pm
by skamasle
Stil working on this :)

I add some information on first post.

I work slowly on this, Im not a programer and dont have much time, and I not get beta testers.

Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta

Posted: Tue Apr 05, 2016 5:08 pm
by amitz
Hello,

You can count me in to test.