Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
  1. #1
    Member
    Join Date
    Dec 2009
    Posts
    27

    Default [case 50724] Overwrite existing MySQL database on backup restore

    Hi,

    In version 11.30 mysql databases are not restored from backup with all other files if under cpanel account already exist database with the same name.
    In version 11.28 and all other before MySQL databases was restored altogether with all files.

    Currently we can check checkbox "Restore MySQL DBs" before backup restore, but restored databases are only databases deleted from cpanel account before restore, existing databases are skipped and only files are restored.
    That partial restore results in broken website, especially when we need restore some CMS like Joomla or Wordpress.

    Please add another option "Overwrite existing MySQL DBs" so we can easily restore complete account from backup archive.
    Currently we can restore only account files but MySQL databases need manually restore via SSH.


    Regards,
    Miron J.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    You want this to work, even if you're overwriting another user's database? In an environment where user prefixing is disabled, a user creates a database called "sales_db" - then you go to import a user who was in an environment where prefixing was enabled, and their username was "sales" and they had a database named "sales_db."

    So even though sales_db doesn't belong to user sales, you still want the sales_db (belonging to user: sales) to overwrite the existing content of sales_db (not accessible to user sales)?

    There seems like there should be a much more refined way of doing this. Any suggestions?

  3. #3
    Member
    Join Date
    Dec 2009
    Posts
    27

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    I have not disabled user prefixing, so I will not overwrite any wrong database when i'm restoring an account from daily/weekly server backup, just databases under user account that is restored.
    Maybe if you can add another option "Overwrite existing MySQL DBs", and some warning info message right at database restore point if "Overwrite existing MySQL DBs" is enabled, so instead of skipping database restore, show popup message box and ask admin to approve (this/all) or skip database restore.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    Okay, let's see what other folks think before we go out and implement this.

    In the meantime, if you want, you can try reporting this as a bug. This is one of those few times where it's hard to judge if this would be considered a bug (since databases are not being restored) or a feature (now allowing databases to be overwritten in a situation where the database could be owned by another user).

    If you do get a case number, post it here so I can update this thread when that case is resolved.

  5. #5
    Member
    Join Date
    Dec 2009
    Posts
    27

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    I think that this issue is covered with cPanel bugreport ID# 1513325 , please check.

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    Thanks for the head's up. Just making sure all avenues on this were being pursued .

  7. #7
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    942
    cPanel/Enkompass Access Level

    Root Administrator

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    Quote Originally Posted by cPanelDavidG View Post
    You want this to work, even if you're overwriting another user's database? In an environment where user prefixing is disabled, a user creates a database called "sales_db" - then you go to import a user who was in an environment where prefixing was enabled, and their username was "sales" and they had a database named "sales_db."

    So even though sales_db doesn't belong to user sales, you still want the sales_db (belonging to user: sales) to overwrite the existing content of sales_db (not accessible to user sales)?

    There seems like there should be a much more refined way of doing this. Any suggestions?
    Well, the script must be enough intuitive to check these kind of posibilities before beginning the copy of the first file.
    - If there is any user with the same name of those you want to import/restore, it has to offer the option to rename or abort.
    - If there is any database with the same name of those you want to import/restore, it has to offer the option to rename or abort if it belongs to another user (when importing/restoring), and the option to overwrite/rename/abort if it belongs to the same user (when restoring, only?).

    In both cases, the screen should show the warnings about what may happen if you rename a user or database, to avoid the sysadmin from commiting a big mistake, because in the majority of cases, this task will probably be executed on demand by a host admin in response to a support ticket requesting help on import/restore some account. I don't want to mess around customers' databases! :P

  8. #8
    Member
    Join Date
    Jul 2003
    Posts
    64

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    I've also just come across this change in behaviour which had me puzzled for a couple of days.

    I would think it would be fair to keep the pre-11.30 behaviour IF database prefixes are still enabled and an override option if not.

  9. #9
    Member
    Join Date
    Jun 2006
    Posts
    70

    Default re: [case 50724] Overwrite existing MySQL database on backup restore

    Quote Originally Posted by aegis View Post
    I've also just come across this change in behaviour which had me puzzled for a couple of days.

    I would think it would be fair to keep the pre-11.30 behaviour IF database prefixes are still enabled and an override option if not.

    I agree with this. This bug/problem, is very annoying and is not easy when we've thousands of clients and many requests for restoring a mysql database backup (override).

  10. #10
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    We current anticipate accommodating this in version 11.32.

  11. #11
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    Stumbled upon this thread today, looking for something else. This is scary stuff! When I do a "restore" in WHM, I darn well expect the users database(s) to be rolled back and restored to their backup state, when the checkbox "Restore MySQL DBs" is checked.

    Glad it is being addressed.

    - Scott

  12. #12
    Member
    Join Date
    May 2006
    Location
    Morocco
    Posts
    158
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    SAME isseu here ...

    we need to return this option to restore daatabases from restore backup .

    1+ VOTED

  13. #13
    Member Robert_'s Avatar
    Join Date
    Apr 2002
    Location
    Arizona
    Posts
    106

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    Same issue for me as well.
    Regards, Robert


  14. #14
    Member
    Join Date
    May 2006
    Location
    Morocco
    Posts
    158
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    Today , when i want to transfer accounts from server A to server B i get the same error

    (Sorry, a mysql database with the name already exists) Skipping username_database

    note the server A is empty and new server !!!!!!!!!!!!

    WHM 11.30.3 (build 3)

  15. #15
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default Re: [case 50724] Overwrite existing MySQL database on backup restore

    YEPP, SAME ISSUE HERE!
    Trying to move accounts between servers.

    (Sorry, a mysql database with the name already exists) Skipping xxxx_xxxx

Similar Threads & Tags
Similar threads

  1. Restore backup but not mysql database
    By isputra in forum Data Protection
    Replies: 1
    Last Post: 07-20-2010, 08:53 AM
  2. overwrite existing accounts on the server
    By asmar in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-08-2006, 12:48 PM
  3. Cannot overwrite existing files in the directory
    By foreigndude in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-21-2005, 04:47 AM
  4. Are the Full backup restore mysql database ????
    By mrazh in forum cPanel and WHM Discussions
    Replies: 39
    Last Post: 10-21-2004, 09:20 AM
  5. Add existing MySQL database to Cpanel / phpmysqladmin?
    By neilio in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2004, 12:21 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube