Thanks for the tip. But now I guess I am stuck with another error as below:
(env)ad...@addy:~/frappe-bench/sites$ frappe --restore DB_NAME /home/Downloads/XXX_database.sql --force
MySQL root password:
Created user DB_NAME
Created database DB_NAME
Granted privileges to user DB_NAME and database DB_NAME
Starting database import...
sh: 1: cannot open /home/Downloads/XXX_database.sql: No such file
Imported from database /home/Downloads/XXX_database.sql
Traceback (most recent call last):
File "/home/addy/frappe-bench/env/bin/frappe", line 9, in <module>
load_entry_point('frappe==4.1.0', 'console_scripts', 'frappe')()
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 53, in main
return run(fn, parsed_args)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 81, in run
out = globals().get(fn)(*args.get(fn), **args)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 67, in new_fn
return fn(*args, **new_kwargs)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 375, in restore
_install(db_name, source_sql=source_sql, quiet=quiet, force=force)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 308, in _install
install_app("frappe", verbose=verbose, set_as_patched=not source_sql)
File "/home/addy/frappe-bench/apps/frappe/frappe/installer.py", line 87, in install_app
frappe.clear_cache()
File "/home/addy/frappe-bench/apps/frappe/frappe/__init__.py", line 284, in clear_cache
frappe.sessions.clear_cache()
File "/home/addy/frappe-bench/apps/frappe/frappe/sessions.py", line 55, in clear_cache
for sess in frappe.db.sql("""select user, sid from tabSessions""", as_dict=1):
File "/home/addy/frappe-bench/apps/frappe/frappe/database.py", line 118, in sql
self._cursor.execute(query)
File "/home/addy/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/addy/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table 'rigpl.tabSessions' doesn't exist")
On Wednesday, July 2, 2014 6:31:44 PM UTC+5:30, Anand Doshi wrote:
If you are doing this in a VM or somewhere other than your production server, use --force at the end of the command and it should be safe. Also, once the database is restored, you should get a message "Scheduler is disabled". Make sure that this message appears, else email pulling will start on this test setup.
-Anand.
On Wed, Jul 2, 2014 at 4:49 PM, Aditya Duggal
<ad…@gmail.com> wrote:
I am getting this error:
Traceback (most recent call last):
File "/home/addy/frappe-bench/env/bin/frappe", line 9, in <module>
load_entry_point('frappe==4.1.0', 'console_scripts', 'frappe')()
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 53, in main
return run(fn, parsed_args)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 81, in run
out = globals().get(fn)(*args.get(fn), **args)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 67, in new_fn
return fn(*args, **new_kwargs)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 375, in restore
_install(db_name, source_sql=source_sql, quiet=quiet, force=force)
File "/home/addy/frappe-bench/apps/frappe/frappe/cli.py", line 306, in _install
admin_password = admin_password, verbose=verbose, force=force, site_config=site_config, reinstall=reinstall)
File "/home/addy/frappe-bench/apps/frappe/frappe/installer.py", line 30, in install_db
create_database_and_user(force, verbose)
File "/home/addy/frappe-bench/apps/frappe/frappe/installer.py", line 47, in create_database_and_user
raise Exception("Database %s already exists" % (db_name,))
Exception: Database rigpl already exists
No matter what name of the database I choose, I am getting the same error. Could you please let me know what is it that I am missing.
On Tuesday, June 17, 2014 12:46:21 PM UTC+5:30, rushabh wrote:
Aditya,
You have to start the Python virtual env:
cd frappe-bench
. env/bin/activate
Hi,
I am getting a frappe command not found after I did the below things:
:~/frappe-bench/sites$ frappe --restore DBNAME SQLFILE
frappe: command not found
What am I missing?
On Monday, June 16, 2014 12:35:53 PM UTC+5:30, rushabh wrote:
Thanks Aditya for pointing out. Fixed instructions:
https://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup
On 16-Jun-2014, at 11:15 am, Aditya Duggal <
ad…@gmail.com> wrote:
Hi,
I am trying to restore a backup on v4 but I guess the old method does not work.
Can someone please let me know the correct way to restore an old backup on v4.
I am using the wiki page here:
https://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup
On Thursday, December 12, 2013 10:54:07 AM UTC+5:30, Mahesh wrote:
hi, when I say
./lib/wnf.py --restore erpnext path/to/sqlfile --force
it is saying no such file.
where as I checked with dir , the file is very much there...
what am I missing.
Sorry for putting a very silly question here.....
Regards,
Mahesh
On Wed, Dec 11, 2013 at 12:02 PM, Pratik Vyas
<pd...@gmail.com> wrote:
Hi Mahesh,
Can you run update again, latest version should be able to patch your instance without any exceptions.
–
Note:
If you are posting an issue,
- We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
- Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
- For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
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-forum+unsubscr…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
Note:
If you are posting an issue,
- We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
- Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
- For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
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-forum+unsubscr…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/aeddb58c-a507-4d08-8673-cb069e31257b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
Note:
If you are posting an issue,
- We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
- Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
- For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
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-forum+unsubscr…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8f43f0a9-bdd5-45c2-96f5-65885a2d883a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
Note:
If you are posting an issue,
- We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
- Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
- For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8c2d6ad2-ca18-418f-be23-384e7baa5ce8%40googlegroups.com.