SK-cPanel-Importer | Restore cPanel Backup on Vesta Topic is solved

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

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

Postby skamasle » Sun Apr 09, 2017 9:40 am

dpeca wrote:Please test scenario where (in cPanel) the same mysql user is used for two databases, or one database has granted to two different mysql users.
I noticed that importer script creates the same database two times in db.conf, and it brakes backup system.


In my test there is no issue if one user is asigned to multiple databases, I have a backup with 5 databases, one user is used in 3 of 5

But I not test never if database have multiple users asigned, but I cant do nothing for this if vesta not support it, just recomended user leave one user per database before do a backup.

I have some issues with default user, and I remove it for same issue

Code: Select all

# default cpanel user has all database privileges
# if you use default user in your config files to connect with database
# you will need remove && [ "$userdb" != "$sk_cp_user" ] to restore main user, but
# this will cause database duplication in db.conf and will interfer with vestacp backups
         if [ "$userdb" == "$user" ] && [ "$userdb" != "$sk_cp_user" ] && [ "$userdb" != "$sk_real_cp_user" ] ; then
            echo "DB='$db' DBUSER='$userdb' MD5='$end_user_pass' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" >> /usr/local/vesta/data/users/${sk_cp_user}/db.conf
         fi
      done
done

dpeca
Collaborator
Posts: 227
Joined: Wed Nov 25, 2015 7:30 pm
Location: Serbia

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

Postby dpeca » Sun Apr 09, 2017 1:38 pm

I found a vesta backup.log, to help you to figure out how it breaks the backup.

So, in /usr/local/vesta/log/backup.log i found this:
-- DB --
2017-03-29 23:19:10 novisind_nst (mysql)
2017-03-29 23:19:10 novisind_nst (mysql)
gzip: /backup/tmp.T9RmIk9lg1/db/novisind_nst/novisind_nst.mysql.sql.gz already exists; do you wish to overwrite (y or n)?


That was last line of backup.log - so it means that backup script get stuck there.
Vesta backup script wait for y/n response (do you wish to overwrite (y or n)).

In /usr/local/vesta/data/users/novisad/db.conf I found elfi83_db1 two times, in two lines, with different mysql users - I'm talking this from my remember, dont trust me 100% about different mysql users.

System is Debian 8.7.
Maybe it's not reproducible on CentOS.

Probably two different mysql users was granted to the same database in cPanel, I guess.

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

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

Postby skamasle » Sun Apr 09, 2017 5:58 pm

dpeca wrote:I found a vesta backup.log, to help you to figure ot how it breaks the backup.

So, in /usr/local/vesta/log/backup.log i found this:
-- DB --
2017-03-29 23:19:10 novisind_nst (mysql)
2017-03-29 23:19:10 novisind_nst (mysql)
gzip: /backup/tmp.T9RmIk9lg1/db/novisind_nst/novisind_nst.mysql.sql.gz already exists; do you wish to overwrite (y or n)?


That was last line of backup.log - so it means that backup script get stucked there.
Vesta backup script wait for y/n response (do you wish to overwrite (y or n)).

In /usr/local/vesta/data/users/novisad/db.conf I found elfi83_db1 two times, in two lines, with different mysql users - I'm talking this from my remember, dont trust me 100% about different mysql users.

System is Debian 8.7.
Maybe it's not reproducible on CentOS.

Probably two different mysql users was granted to the same database in cPanel, I guess.



Yes this can happen, but this cant be fixed, vesta not suport it, I can only add one check, if database exists in db.conf not add more dbs with same name only restore, but this can break something in future.

In any case vesta cant handle this, uniq option is add this to faq as warning / notice and try fix in code for not add same database two times.

dpeca
Collaborator
Posts: 227
Joined: Wed Nov 25, 2015 7:30 pm
Location: Serbia

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

Postby dpeca » Sun Apr 09, 2017 6:09 pm

Maybe Vesta backup script should be fixed.
If I'll have a time I will try to add parameter to gzip (in vesta backup script) to prevent blocking.

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

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

Postby skamasle » Sun Apr 09, 2017 8:15 pm

dpeca wrote:Maybe Vesta backup script should be fixed.
If I'll have a time I will try to add parameter to gzip (in vesta backup script) to prevent blocking.


Backup need a lot of fixes -> https://bugs.vestacp.com/issues/517

Backup also fail if you have corrupted database or some broken nginx vhost.

dmitry.vd
Posts: 6
Joined: Wed Apr 05, 2017 10:23 am

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

Postby dmitry.vd » Tue Apr 11, 2017 3:19 pm

skamasle wrote:I cant reproduce this yet. I will test with more backups


If it helps I can send you cPanel back up link using private message.

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

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

Postby skamasle » Wed Apr 12, 2017 7:23 am

dmitry.vd wrote:
skamasle wrote:I cant reproduce this yet. I will test with more backups


If it helps I can send you cPanel back up link using private message.


Ok send me it, I will investigate when get some time this week

dmitry.vd
Posts: 6
Joined: Wed Apr 05, 2017 10:23 am

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

Postby dmitry.vd » Fri Apr 14, 2017 10:04 am

skamasle wrote:
dmitry.vd wrote:
skamasle wrote:I cant reproduce this yet. I will test with more backups


If it helps I can send you cPanel back up link using private message.


Ok send me it, I will investigate when get some time this week



Sent private message.

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

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

Postby skamasle » Fri May 05, 2017 7:09 pm

I think this is stable now

So maybe this need be closed :)

bdacus01
Posts: 5
Joined: Mon Aug 28, 2017 6:21 pm

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

Postby bdacus01 » Tue Aug 29, 2017 9:45 pm

Typo

rsync not installed, try install it
This script need: rsync, file
#######################################
Run: yum install rync file


Return to “3rd Party Software”



Who is online

Users browsing this forum: Exabot [Bot] and 4 guests