Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    112
    Plugin Contributions
    0

    Default Use MySQL Backup Mod as transfer utility?

    A client's store has a pretty large db (about 20MB). Backing it up (either with cPanel or phpMyAdmin) is no problem, but restoring it on my local box with phpMyAdmin won't work unless I break the file up into 5-6 separate files. (NOTE: I increased php's file size parameters to the max 32MB, but phpMyAdmin still chokes!)

    Since one of the advantages of Dr. Byte's Backup MySQL mod is that it handles large databases, I thought I might use it to backup the "live" site, download it to my laptop and "restore" it there. Besides having to change the config files, are there any reasons why this wouldn't work?

    Server details:

    Production - Server OS: Linux 2.6.9-42.0.10.ELsmp
    Database: MySQL 5.0.45-community
    PHP Version: 5.2.5 (Zend: 2.2.0)
    HTTP Server: Apache/2.2.6 (Unix)

    Local: Server OS: Windows NT 5.1 build 2600
    Database: MySQL 5.0.22-community-nt
    PHP Version: 5.1.4 (Zend: 2.1.0)
    HTTP Server: Apache/2.0.58 (Win32) PHP/5.1.4

    Thanks!
    RAB

    Why is it I'm always surprised when something actually works?

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Use MySQL Backup Mod as transfer utility?

    There is php script that works extremely well when restoring huge database file, it's called BigDump, you can google for it.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Use MySQL Backup Mod as transfer utility?

    Quote Originally Posted by rbobzin View Post
    Since one of the advantages of Dr. Byte's Backup MySQL mod is that it handles large databases, I thought I might use it to backup the "live" site, download it to my laptop and "restore" it there. Besides having to change the config files, are there any reasons why this wouldn't work?
    I use it frequently for this very purpose.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Mar 2007
    Posts
    112
    Plugin Contributions
    0

    Default Re: Use MySQL Backup Mod as transfer utility?

    Hi, Doc! Based on your reply, I uploaded your mod to the production server, and backup worked beautifully. But when trying to restore the db to the same site on my laptop, got this error (with debug=ON):

    Code:
    Checking Path: c:/5/bin/.exe/
    Warning Checking Path: c:/mysql5/bin/
    Warning 
    Warning COMMAND FILES SELECTED:
    Warning mysqlexe="c:/mysql5/bin/mysql.exe"
    Warning mysqldumpexe="c:/mysql5/bin/mysqldump.exe"
    
    Warning COMMAND: "c:/mysql5/bin/mysql.exe" "--database=database" "--host=localhost" "--user=user" "--password=password" database < "c:/apache2/htdocs/site/admin/backups/db_database-20080102092929.sql" 2>&1
    Error valueA: operable program or batch file.
    Error valueB:
    Warning Result code: 1
    Error Failure: The database may NOT have been restored properly. Please check it carefully.
    I did correct the path in the /admin/includes/languages/english/backup_mysql.php file as the readme suggested, but have no clue how to change the security permissions to allow "Internet Guest Account" to run cmd.exe. My laptop is Win XP, so could that be the problem? If yes, then please advise which option sounds better to you:

    1. Make the permission changes on the laptop
    2. Move the localhost site over to my desktop running Win 2000Pro and Xampp

    Thanks!
    RAB

    Why is it I'm always surprised when something actually works?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Use MySQL Backup Mod as transfer utility?

    If you're running MySQL on your laptop, you should be able to use phpMyAdmin to do the restore.

    Or you could run the mysql.exe command from a command prompt ... basically use all the parameters that you quoted earlier:
    "c:/mysql5/bin/mysql.exe" "--database=database" "--host=localhost" "--user=user" "--password=password" database < "c:/apache2/htdocs/site/admin/backups/db_database-20080102092929.sql"
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Mar 2007
    Posts
    112
    Plugin Contributions
    0

    Default Re: Use MySQL Backup Mod as transfer utility?

    Thanks for the quick reply! phpMyAdmin always timed out - Fatal error blah blah blah - whenever I tried to restore any sql file over about 10-12 MB, which is why I wanted to use your mod instead. The db I'm trying to restore now is 17MB, and phpMyAdmin choked...again.

    In the meantime, I installed the site files and your mod on my desktop's (Win2kPro) localhost (xampp), and got the same error as reported in the above post, so thought maybe the error isn't XP or Internet Guest Account related??? So, searched through the forums again, and found a new thread my earlier search didn't pick up which had this post from you:
    To get around Windows' need to use quotes when handling paths that include spaces in the filename/path, simply edit line 23 from this:

    Code:
     define('OS_DELIM', '');
    to this:

    Code:
     define('OS_DELIM', '"');
    And that was the winner - restore worked perfectly!

    So, anyone having similar problems as I described above, it seems to be an easy 2-step fix:

    1. Correct the path for mysql.exe and mysqldump.exe in the /admin/includes/languages/english/backup_mysql.php file
    2. Make the "define('OS_DELIM', '"');" change to /admin/backup_mysql.php file

    Bingo!
    Last edited by rbobzin; 3 Jan 2008 at 12:17 AM.
    RAB

    Why is it I'm always surprised when something actually works?

 

 

Similar Threads

  1. Backup MySQL mod v1.4 - problem
    By Earnest-Enterprises in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 22 Nov 2010, 01:45 AM
  2. Cannot Use Backup DB Utility after Host Tranfer
    By JE2009 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 2 Sep 2009, 04:36 AM
  3. MySQL database backup utility
    By ckosloff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 Sep 2008, 06:29 PM
  4. Backup MySQL mod - Windows 2003 problem
    By metafizx in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 2 Jul 2007, 07:29 AM
  5. MySQL Backup Mod
    By atlantis in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 15 Oct 2006, 12:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg