Is There a way to restore database data from version 2 to version 3 ?

25 views
Skip to first unread message

HF

unread,
Apr 20, 2013, 6:27:59 AM4/20/13
to erpnext-dev...@googlegroups.com
Hi;

I have tried to upgrade from version 2 (my last update was on september 2012) and it fails with lot of errors, then finally I tried to install a fresh installation of version 3 yesterday and it was successfull, but I need to restore my old data from version 2 is it possible or I have to do that manually table by table ?

Thanks.

Anand Doshi

unread,
Apr 20, 2013, 6:48:41 AM4/20/13
to erpnext-dev...@googlegroups.com, erpnext-dev...@googlegroups.com
Hi HF,

Make sure you have a copy of your database backed up. 

Try this out:
lib/wnf.py --install NEW_DB_NAME PATH_TO_BACKUP_SQL

change db_name in conf.py

Run
lib/wnf.py --patch_sync

You will need to change Administrator password as it gets reset to admin

Sent from my phone
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/18u0jyIx1vkJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

HF

unread,
Apr 20, 2013, 3:14:13 PM4/20/13
to erpnext-dev...@googlegroups.com
Hi Anand;

It gives me a lot of errors when I run patch_sync.

Is there any other way?

Thanks.

Rushabh Mehta

unread,
Apr 22, 2013, 12:38:36 AM4/22/13
to erpnext-dev...@googlegroups.com
HF,

What are the errors?

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

HF

unread,
Apr 22, 2013, 4:44:20 AM4/22/13
to erpnext-dev...@googlegroups.com
Hi Rushabh;

I got these errors :

root@erpnext:/var/www/erp/erpnext# lib/wnf.py --patch_sync
u'--- query explain ---'
Executing patches.october_2012.fix_wrong_vouchers in erpnextdb33
Success
Executing patches.october_2012.remove_old_customer_contact_address in erpnextdb33
Success
Executing patches.october_2012.company_fiscal_year_docstatus_patch in erpnextdb33
Success
Executing patches.october_2012.update_account_property in erpnextdb33
Traceback (innermost last):
  File "/var/www/erp/erpnext/lib/webnotes/modules/patch_handler.py", line 74, in execute_patch
    webnotes.get_method(patchmodule + ".execute")()
  File "app/patches/october_2012/update_account_property.py", line 14, in execute
    where lft > %(lft)s and rgt < %(rgt)s""", acc, debug=1)
  File "/var/www/erp/erpnext/lib/webnotes/db.py", line 120, in sql
    raise e
 ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update tabAccount set debit_or_credit = 'Debit', \n\t\t\tis_pl_account = 'No', compa' at line 1")

patches.october_2012.update_account_property: failed: STOPPED

Thanks.

Anand Doshi

unread,
Apr 22, 2013, 4:57:12 AM4/22/13
to erpnext-dev...@googlegroups.com
Hi HF,

Please run update again. We have fixed the issue.

Thanks,
Anand.

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

HF

unread,
Apr 22, 2013, 5:51:47 AM4/22/13
to erpnext-dev...@googlegroups.com
Hi Anand;

Which command to update ?


HF

unread,
Apr 22, 2013, 5:59:39 AM4/22/13
to erpnext-dev...@googlegroups.com
Hi Anand;

OK I made the update,

It works now and have my old data in version 3.

Thank you so much.

HF
Reply all
Reply to author
Forward
0 new messages