1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 How can I copy a DB dump to my localhost ?

Discussion in 'XenForo Questions and Support' started by rhodes, Apr 26, 2014.

  1. rhodes

    rhodes Active Member

    Hello,

    I made a database dump of my xf1.3 production environment and tried to restore the dump to my local db using mysql on the command line (Max OSX). Everything seems fine, no error, but when I tried to start my local xf1.3 (develop.dev/community) only a white screen appears. :(

    What is my mistake? How can I synchronize production and development data?

    Thank you, rhodes.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    View the page source, that may show the actual error.

    When I update my local I do the following:
    1. Take a dump of the live database using mysqldump
      1. mysqldump -u<user> -p<password> --single-transaction --skip-lock-tables db_name > /path/to/backup/db_name_$(date +%d.%m.%y).sql
      2. tar -czf db_name_$(date +%d.%m.%y).tar.gz /path/to/backup/db_name_$(date +%d.%m.%y).sql
    2. Zip the entire installation directory
      1. tar -czf files_$(date +%d.%m.%y).tar.gz /path/to/install
    3. Download the zipped database dump and files
    4. Delete all existing files from my localhost installation directory
    5. Extract the downloaded zipped files to my localhost installation directory
    6. Update config.php with the localhost db details - db name, user, password
    7. Drop the tables from the localhost db
    8. Import the live db using
      1. mysql -uroot -proot db_name_dev <db.sql
     
  3. rhodes

    rhodes Active Member

    Thank you @Brogan , I will try this exactly as you did.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. rhodes

    rhodes Active Member

    Thank you for the link.

    Unfortunately it does not work as expected.

    When I try to import the xf1.3 DB into my test environment

    ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode.

    Hm, I'm not sure where this error comes from. Any ideas?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That sounds like a configuration issue with your local installation.

    You need to resolve this: "but this is not allowed unless option -- binary-mode is enabled and mysql is run in non-interactive mode".
     
  7. Tracy Perry

    Tracy Perry Well-Known Member

  8. woei

    woei Well-Known Member

    rhodes likes this.
  9. rhodes

    rhodes Active Member

Share This Page