Database Clone

Discussion in 'aMember Pro v.4' started by mhmtozek, Mar 5, 2012.

  1. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    Is there any easy way to clone DB from one domain to another by keeping all the data in it as it is?

    I am able to run a simple sql query to replace every site url without any problem, but before that stage; while importing database i do get mysql error for certain tables

    PHP:
    INSERT INTO am_invoice_item (invoice_item_id,invoice_id,item_id,item_type,item_title,item_description,qty,first_price,first_discount,first_tax,first_total,first_shipping,first_period,rebill_times,second_price,second_discount,second_tax,second_total,second_shipping,second_period,currency,no_tax,trial_group,renewal_group,is_countable,is_tangible,billing_plan_id,billing_plan_data,option1,option2,option3,variable_qtyVALUES ('394','393','40','product','Support Forum Subscribition','','1','40.00','0.00','0.00','40.00','0.00','1y','0','','0.00','0.00','0.00','0.00','','USD','0','','','0','0','40','a:0:{}','','','','0');
    PHP:
    INSERT INTO am_aff_banner (banner_id,type,title,desc,upload_id,upload_big_id,url,mime,width,height,is_disabledVALUES ('1','2','120x600','','18','','http://www.gabfirethemes.com/wp-themes/','','120','600','');
    Als I get error for am_data table too, i didnt go down around all tables.

    Any suggestion what might be wrong?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    How do you get MySQL dump that is causing errors?
    How do you load the dump?
  3. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    Using cPanel -> backups page, i downloaded a .gz format of db. i extracted it -> opened sql file with notepad++ to replace all instances of old url with new one (find replace) -> saved it back as and compresed it as gzip and tried to import via phpmyadmin
  4. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    Sorry, i didnt use cPanel to export database, i exported it via amember admin control panel.
  5. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    Worked when i tried to download db from cPanel, I was able to export and import DB successfully.

Share This Page