Jump to content

Importing live website database using Process Database Backups is not working


Rob(AU)
 Share

Recommended Posts

I am trying to import the database from my live website to my local server.

It seems that exporting the website database to a sql file using Ryan's module only copies some cache tables.
When on the DB Backups view page the sql file that was exported from the live site, and uploaded to the local server, shows as having 100 tables and 3,00 rows. Yet when I try to restore it the following error shows up:

Quote

ProcessDatabaseBackups: Error restoring: /volume4/web/landscapes/site/assets/backups/database/2021_06_05_live.sql

I have exported the database using phpmyadmin, then imported it to the local server using phpmyadmin. That appears to be working, except that I then cannot edit or add pages. The following error come up:

Quote

PagesEditor: Error saving field "Title" — Unable to save to 'field_title' for page that doesn't exist in pages table

ProcessPageAdd: Unable to save to 'field_title' for page that doesn't exist in pages table

Both installations are using ProcessWire 3.0.165, the live server is running PHP version: 7.3.28, and the local server PHP version: 7.3.16. Both use the same (long) password.

If anyone can give me some help that would be greatly  appreciated!

Link to comment
Share on other sites

First of all I would turn on debug mode if not already.
That should tell a bit more even within the module. 

How many tables and rows were exported and shown on the live website?
More tables and rows or the same amount?

Have you looked into the .sql file?
Could you spot something that looks a bit off?

I once had a weird issue were creation dates were all set to something like 0000-00-00 00:00:00 which didn't work out very well.

Another thing you could and maybe should try:
Create a new database on your local server with the exact same settings (charset, db engine) and change import the SQL there.

Yet another thing you could check:
Does the database user in your local environment have all necessary privileges?

Whats your local setup:
MAMP, XAMP, Laragon, Docker?

Link to comment
Share on other sites

Thanks Alexander,
response was really helpful in getting me to check things I hadn't thought of.

I'm not entirely sure what the issue was, and I will keep looking. The issue was solved by using the adminer module to export the live data and import that into the NAS hosted local server.

It is working fine now.

Link to comment
Share on other sites

Moderator note: this is not a module support thread, so I'm moving it to the General Support area of the forum instead. Please keep in mind that the Modules/Plugins area is only intended for module-specific support threads. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...