Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section 3rd Party Software
  • Search

SK-cPanel-Importer | Restore cPanel Backup on Vesta

Section with additional software for Vesta
Post Reply
  • Print view
Advanced search
95 posts
  • Page 9 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

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

Post by 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
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

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

Post by 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.
Top

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

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

Post by 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.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

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

Post by 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.
Top

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

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

Post by 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.
Top

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

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

Post by 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.
Top

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

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

Post by 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
Top

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

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

Post by 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.
Top

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

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

Post by skamasle » Fri May 05, 2017 7:09 pm

I think this is stable now

So maybe this need be closed :)
Top

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

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

Post by 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
Top


Post Reply
  • Print view

95 posts
  • Page 9 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next

Return to “3rd Party Software”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password