Continuing the discussion from Restore from ERPnext Virtual Machine to Ubuntu new installation:
This is what I get when I run restore:
root@ahmed-Q500A:/home/ahmed/frappe-bench# ls
20141230_21537504_database.sql config env Procfile
apps config.json logs sites
root@ahmed-Q500A:/home/ahmed/frappe-bench# bench frappe --restore erpnext 20141230_21537504_database.sql
MySQL root password:
Traceback (most recent call last):
File â/home/ahmed/frappe-bench/env/bin/frappeâ, line 9, in
load_entry_point(âfrappe==4.9.1â, â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 318, in _install
admin_password = admin_password, verbose=verbose, force=force, site_config=site_config, reinstall=reinstall)
File â/home/ahmed/frappe-bench/apps/frappe/frappe/installer.pyâ, line 31, in install_db
create_database_and_user(force, verbose)
File â/home/ahmed/frappe-bench/apps/frappe/frappe/installer.pyâ, line 52, in create_database_and_user
raise Exception(âDatabase %s already existsâ % (db_name,))
Exception: Database site3.local already exists
Just noted that VM is running old bench, while local machine runs new bench. I donât know if this can cause trouble, but anyway I have updated bench on VM now.
Still no luck. I am stuck at this stage and will require your help.
Pass -f
to ignore the the warning and replace current data,
bench frappe --restore site3.local 20141230_21537504_database.sql -f
I have done that, and it ends up in an error, something related to âaccess denied for user âŚâ. Then when I try to log in from browser I get âInternal Server Errorâ.
Try the following,
bench new-site site4.local
bench frappe --restore site4.local /path/to/sql -f site4.local
bench set-default-site site4.local
bench setup nginx
Then
as root,
service nginx reload
You can then drop databases that aren;t required.
This worked. Thanks.
How can I drop the not required databases ?
Regards,
You can run drop database query as mysql root user. Be careful to not drop a system database or the database the production site youâre using.
can you share restore process in vm machine
i wanted to backup vm hosted erpnext and restore it to another vm.