Page 1 of 1
How add databases created with phpmyadmin in backup ?
Posted: Mon Jul 25, 2016 7:46 pm
by gilbert721
Hi everyone !
I just discover Vesta and like it :)
I have a question... the backup function seems to work like a charm, but inside, I don't find the mysql databases of my websites.
I think this is because I prefer to manage all my databases directly with phpmyadmin (so I see my databases only in phpmyadmin and not in the vesta control panel under the DB section).
Is there someone who have a solution in order to add all databases we have in mysql (all database I see on phpmyadmin) in the backup ?
Thank you in advance for all people who can help me !
Regards,
Gilbert
Re: How add databases created with phpmyadmin in backup ?
Posted: Tue Jul 26, 2016 6:57 am
by skurudo
gilbert721 wrote:
I just discover Vesta and like it :)
Hi, Gilbert
Nice to hear! :)
gilbert721 wrote:
I think this is because I prefer to manage all my databases directly with phpmyadmin (so I see my databases only in phpmyadmin and not in the vesta control panel under the DB section).
Is there someone who have a solution in order to add all databases we have in mysql (all database I see on phpmyadmin) in the backup ?
Manually.
You can add info about your db to file - /usr/local/vesta/data/users/admin/db.conf (or other user if you have any)
It's look like (example with two databases):
Code: Select all
DB='admin_ru' DBUSER='admin_ru' MD5='*6856731FA3B869EC57DD182553B62343AEC3AE55E' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='1' SUSPENDED='no' TIME='12:13:55' DATE='2015-10-23'
DB='admin_test' DBUSER='admin_test' MD5='*DCFCFC391AC17E17A2F4A95EB13DB49E7A82FA4' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='1' SUSPENDED='no' TIME='00:02:26' DATE='2015-11-29'
Or you have second way - greate new databases in VestaCP, copy data with phpmyadmin and make changes in scripts. ;-)
Re: How add databases created with phpmyadmin in backup ?
Posted: Tue Jul 26, 2016 3:15 pm
by gilbert721
Hi skurudo !
Thank you for your quick answer :D
Ok I understand the logic and I will try your solutions :)
Maybe later (if you are in the team of Vesta) you could add by default to backup all databases we have in mysql. No need to do more because there is an exclusion option ! And you will have the perfection (if it's possible of course) :)
Have a good continuation !
Regards,
Gilbert
Re: How add databases created with phpmyadmin in backup ?
Posted: Wed Jul 27, 2016 7:23 am
by skurudo
gilbert721 wrote:
Maybe later (if you are in the team of Vesta) you could add by default to backup all databases we have in mysql. No need to do more because there is an exclusion option ! And you will have the perfection (if it's possible of course) :)
Mm... dunno. Don't want to upset, but it seems unlikely. I can't see logic there. If you make fresh install and create bases with control panel, than all good. If you do something manually, how control panel will know about this?
What I see and it's similar, it's something like "snapshots" for db/files - copy all data/db for all users.
May be it'll nice feauture... How do you think?
Re: How add databases created with phpmyadmin in backup ?
Posted: Wed Jul 27, 2016 12:53 pm
by gilbert721
Snapshot will be finally the best option :)
The important is to keep the possibility to use only phpmyadmin to manage sql ... and have the possibility to make a backup/snapshot without complex scripts to add !
Do you have the intention of create a snapshot feature later ? :)
Good continuation !
Re: How add databases created with phpmyadmin in backup ?
Posted: Tue Aug 30, 2016 6:49 am
by skurudo
gilbert721 wrote:
Do you have the intention of create a snapshot feature later ? :)
Added already -
https://bugs.vestacp.com/issues/364
dpeca made a script for this -
viewtopic.php?f=10&t=12338#p49399
Re: How add databases created with phpmyadmin in backup ?
Posted: Mon Sep 19, 2016 9:24 am
by moodup
@skrudo. I use you great product. Last time I had problem because I use phpMyAdmin to create database. I would to keep consistent between VestaCP and phpMyAdmin. I didn't know why I don't see my all database in vestaCP dashboard.
Mm... dunno. Don't want to upset, but it seems unlikely. I can't see logic there. If you make fresh install and create bases with control panel, than all good. If you do something manually, how control panel will know about this?
I see 2 options.
I know that during installation VestaCP (and phpMyAdmin) you create user root with the same password typed by user. Root(user database) credentials are saved in '/usr/local/vesta/conf' .Root has access to all databases right?
1. You can create new view where you user can selected databases after installation, which be consistent between mysql and VestaCP.
2. I don't know how it looks right now. But You can create communication with mysql server and use just mysql commends to 'fetch' all databases. (It will be looks like kind of phpMyAdmin). I think you could use mysql commends to simple operating database (show databases, create databases, delete databases) and You will not need
'/usr/local/vesta/data/users/admin/db.conf' to keep all databases.
From my point of view it is bored. If I want to add new database via VestaCP I have to add new user with password. I don't want do that and I have to create database in phpmyAdmin. If I create database in phpmyadmin I will not get backup of my database via VestaCP:(
This is my point of view but Maybe I misunderstood something.