SK-cPanel-Importer | Restore cPanel Backup on Vesta
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
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 5dpeca 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.
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
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
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:
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.
So, in /usr/local/vesta/log/backup.log i found this:
That was last line of backup.log - so it means that backup script get stuck there.-- 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)?
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.
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
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:That was last line of backup.log - so it means that backup script get stucked there.-- 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)?
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.
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
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.
If I'll have a time I will try to add parameter to gzip (in vesta backup script) to prevent blocking.
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
Backup need a lot of fixes -> https://bugs.vestacp.com/issues/517dpeca 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 also fail if you have corrupted database or some broken nginx vhost.
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
If it helps I can send you cPanel back up link using private message.skamasle wrote:I cant reproduce this yet. I will test with more backups
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
Ok send me it, I will investigate when get some time this weekdmitry.vd wrote:If it helps I can send you cPanel back up link using private message.skamasle wrote:I cant reproduce this yet. I will test with more backups
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
skamasle wrote:Ok send me it, I will investigate when get some time this weekdmitry.vd wrote:If it helps I can send you cPanel back up link using private message.skamasle wrote:I cant reproduce this yet. I will test with more backups
Sent private message.
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
I think this is stable now
So maybe this need be closed :)
So maybe this need be closed :)
Re: SK-cPanel-Importer | Restore cPanel Backup on Vesta
Typo
rsync not installed, try install it
This script need: rsync, file
#######################################
Run: yum install rync file
rsync not installed, try install it
This script need: rsync, file
#######################################
Run: yum install rync file