Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Section with additional software for Vesta
skamasle
Posts: 336
Joined: Mon Feb 29, 2016 6:36 pm

Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Postby skamasle » Sun Feb 12, 2017 10:44 pm

Hi

Im working in new script to help people move to vestacp, now I do DirectAdmin importer ( similar to Cpanel Importer )

For now I need a lite help, I need to do some test more in this script whit diferent backups if some body can help and send some backupwhit out sensible data, just backups from user account whit some domains, subdominios, databases etc whit no real information will help a lot.

At this time script can do this:

-Restore full User level account.
-Restore domains and web site files.
-Restore databases, mysql user and passwords.
-Restore Mails accounts whit mail passwords.

What script cant do:
- Restore subdomains -> I not know how subdomains work in DA because I only have backups from DA whit domains, there is no subdomain options in my DA backups so, I Think script need some lines of code to fix this and I will add it when I get new backups whit more content.

-Crons, SSL and some orther features will be added later.

First realease ready!


En español -> https://www.skamasle.com/migrar-cuenta- ... a-vestacp/
Last edited by skamasle on Wed Feb 15, 2017 7:25 pm, edited 1 time in total.

skamasle
Posts: 336
Joined: Mon Feb 29, 2016 6:36 pm

Re: Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Postby skamasle » Wed Feb 15, 2017 7:23 pm

First alpha is here if some body whant test it

Image

Runt at your own risk

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. http://www.gnu.org/licenses/


Code: Select all

cd /root/

wget mirror.skamasle.com/vestacp/skdaimporter/sk_da_importer.sh

bash sk_da_importer.sh da-user-backup.tar.gz


This is alpha, report any problem here.

skamasle
Posts: 336
Joined: Mon Feb 29, 2016 6:36 pm

Re: Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Postby skamasle » Sun Mar 12, 2017 8:07 pm

This was updated, if importer not working ( not restore domains )

You can set sk_get_dom=2 to try get domain list from domain dir directly

Changes in

https://github.com/Skamasle/sk_da_importer

edatamax
Posts: 1
Joined: Sun Mar 12, 2017 4:52 am

Re: Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Postby edatamax » Tue Mar 14, 2017 3:00 pm

Great job!
This script works as described.
Everything gets restored.
I changed sk_get_dom to 2.
Keep up the good work!
Thanks

skamasle
Posts: 336
Joined: Mon Feb 29, 2016 6:36 pm

Re: Sk-DirectAdmin-Importer | Script to Restore DirectAdmin User Account In VestaCP

Postby skamasle » Thu Apr 13, 2017 6:05 pm

There is a issue with centos 6 because use old bash, if some body get this:

Code: Select all

Substring expresion -5: substring expression < 0


There is a fix in github, remplacing on line 122:

Code: Select all

userdb=${sk_da_db_u:: -5}


for

Code: Select all

userdb=$(echo $sk_da_db_u |sed "s/.conf//")


Working fine in bash 4.4 and will fail in bash 4.2 and older maybe in bash 4.3.. ( not tested )


Return to “3rd Party Software”



Who is online

Users browsing this forum: No registered users and 2 guests