Change default MySQL databases location to the account folder instead of root partition
Needs Review
As a web hosting provider I would like cPanel to move the storage of a users databases to their /home/user/ directory, to make it easier to copy them between servers.
Just to further clarify my point of view: A lot of losing hosting companies do not open SSH ports to us to help with the transfer of hosting accounts. The fastest way to transfert server-to-server for now that works universally is by FTP over SSH on the winning server. That being said, MySQL databases are the only component that sits outside of the user directory, making it more complicated to transfer. Having it in the user dir would enable grabbing it along with all the rest in a single FTP operation.
Just to further clarify my point of view: A lot of losing hosting companies do not open SSH ports to us to help with the transfer of hosting accounts. The fastest way to transfert server-to-server for now that works universally is by FTP over SSH on the winning server. That being said, MySQL databases are the only component that sits outside of the user directory, making it more complicated to transfer. Having it in the user dir would enable grabbing it along with all the rest in a single FTP operation.
Why would you need the databases files ? Isn't doing a mysqldump a more reliable method ? In most cases you then either have access to cPanel to download a mysqldump or you can run it from a PHP or Perl script.
I agree that a way to transfer accounts from one cPanel server to another with only the users credentials makes a lot of sense. Maybe cPanel could work out a way that doesn't require SSH and uploads a script via SFTP or FTP to launch the backup maybe with UAPI and transfer the files and databases automaticaly ?
Why would you need the databases files ? Isn't doing a mysqldump a more reliable method ? In most cases you then either have access to cPanel to download a mysqldump or you can run it from a PHP or Perl script.
I agree that a way to transfer accounts from one cPanel server to another with only the users credentials makes a lot of sense. Maybe cPanel could work out a way that doesn't require SSH and uploads a script via SFTP or FTP to launch the backup maybe with UAPI and transfer the files and databases automaticaly ?
Monarobase, yes, the real underlying issue is: how to simplify the database moving. I understand creating a dump and importing it is the only real way of doing it at the moment, but it consumes so much time, look at this workflow, it's just incredibly painful:
1) Open the website's config file (Wordpress or whatever) and take note of the DB name, user and pass.
2) Produce a MYSQL dump via the old server's cPanel.
3) Move the dump file to the user dir where a FTP connection has access to it.
4) Transfer the dump (via server-to-server FTP) to the new server.
5) Connect to cPanel on the new server and create the database.
6) Create a user for that database.
7) Link the new user you just created to the DB.
8) Set the user priviledges.
9) Over SSH (since I only got 800kbps upload speed) import the dump file in MYSQL using #6 credentials.
Like, WTH?
Now look at this workflow for EVERYTHING ELSE altogether:
1) Copy the user directory (via server-to-server FTP) to the new server.
... and you're done. All email accounts were in user/etc/ so that's done. All email directories were in user/mail/ so that's done. All website files were in user/public_html/ so that's done. Why 9 steps per database and just 1 step for EVERYTHING ELSE all at once lol.
Monarobase, yes, the real underlying issue is: how to simplify the database moving. I understand creating a dump and importing it is the only real way of doing it at the moment, but it consumes so much time, look at this workflow, it's just incredibly painful:
1) Open the website's config file (Wordpress or whatever) and take note of the DB name, user and pass.
2) Produce a MYSQL dump via the old server's cPanel.
3) Move the dump file to the user dir where a FTP connection has access to it.
4) Transfer the dump (via server-to-server FTP) to the new server.
5) Connect to cPanel on the new server and create the database.
6) Create a user for that database.
7) Link the new user you just created to the DB.
8) Set the user priviledges.
9) Over SSH (since I only got 800kbps upload speed) import the dump file in MYSQL using #6 credentials.
Like, WTH?
Now look at this workflow for EVERYTHING ELSE altogether:
1) Copy the user directory (via server-to-server FTP) to the new server.
... and you're done. All email accounts were in user/etc/ so that's done. All email directories were in user/mail/ so that's done. All website files were in user/public_html/ so that's done. Why 9 steps per database and just 1 step for EVERYTHING ELSE all at once lol.
Hey all! Thanks for the discussion here, and allowing us to get to the root of the problem.
Speaking to the original request, this is something we're not likely to consider for a few different reasons. The biggest concern to us is the potential for database corruption if a user hits their disk quota.
I'm going to go ahead and mark this as not planned at this time, but I'll bring up the concern at our next planning meeting. If either of you have any questions, please feel free to let me know!
Hey all! Thanks for the discussion here, and allowing us to get to the root of the problem.
Speaking to the original request, this is something we're not likely to consider for a few different reasons. The biggest concern to us is the potential for database corruption if a user hits their disk quota.
I'm going to go ahead and mark this as not planned at this time, but I'll bring up the concern at our next planning meeting. If either of you have any questions, please feel free to let me know!
Replies have been locked on this page!