Issues with restoring backup.sql

Hello,

When I try to restore a backup I receive this error below. Appreciate your help as usual.

ahmed@ahmed-Q500A:~$ ls
20141225_12181875_database.sql Desktop Dropbox frappe_passwords.txt Music Public Shared VirtualBox VMs
20141225_12181875_files.tar Documents examples.desktop google-chrome-stable_current_amd64.deb Old ERPnext Backups setup_frappe.sh Templates wkhtmltox-0.12.1_linux-trusty-amd64.deb
bench-repo Downloads frappe-bench Google Drive Pictures shared Videos
ahmed@ahmed-Q500A:~$ bench frappe --restore site1.local 20141225_12181875_database.sql -f
MySQL root password:
Created user site1.local
Created database site1.local
Granted privileges to user site1.local and database site1.local
Starting database import…
sh: 1: cannot open 20141225_12181875_database.sql: No such file
Imported from database 20141225_12181875_database.sql
Traceback (most recent call last):
File “/home/ahmed/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.9.0’, ‘console_scripts’, ‘frappe’)()
File “/home/ahmed/frappe-bench/apps/frappe/frappe/cli.py”, line 54, in main
return run(fn, parsed_args)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/cli.py”, line 82, in run
out = globals().get(fn)(*args.get(fn), **args)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/cli.py”, line 68, in new_fn
return fn(*args, **new_kwargs)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/cli.py”, line 387, in restore
_install(db_name, source_sql=source_sql, quiet=quiet, force=force)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/cli.py”, line 320, in _install
install_app(“frappe”, verbose=verbose, set_as_patched=not source_sql)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/installer.py”, line 92, in install_app
frappe.clear_cache()
File “/home/ahmed/frappe-bench/apps/frappe/frappe/init.py”, line 287, in clear_cache
frappe.sessions.clear_cache()
File “/home/ahmed/frappe-bench/apps/frappe/frappe/sessions.py”, line 49, in clear_cache
for sess in frappe.db.sql(""“select user, sid from tabSessions”"", as_dict=1):
File “/home/ahmed/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/home/ahmed/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/ahmed/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘site1.local.tabSessions’ doesn’t exist”)

Regards,
Ahmed

Hi Ahmed

I think you might want to read this post:

https://discuss.frappe.io/t/restoring-backup/1476/17

Read posts 17 & 18, I was stuck with same error but it was resolved, the hint is in the posts. Maybe you are not using correct paths.