Trying to migrate from one machine to another, no luck with database restore, help?
Posted: Mon Jan 31, 2022 6:38 pm
I have little knowledge about what I'm doing. Here's the scenario.
I'm moving ZM from a Truenas Jail to an Unraid Docker container. The new ZM is up and running on the Unraid box as a docker container and has no data or events.
The event path for the new instance is `/var/cache/zoneminder/events`.
I've stopped ZM on both Truenas and Unraid from the ZM console. I've rsync'd the entire events folder from the truenas jail to the new events location. Now I need to restore the database.
On the Truenas box, I ran `mysqldump -p zm > zm-dbbackup.sql' then copied that file to the new events folder so the new ZM shell can see it.
When I run `mysql -p zm < zm-dbbackup.sql` I get an error:
ERROR 1146 (42502) at line 331: Table 'zm.Events' doesn't exist
If I `use zm;` and then `show tables;` I see the following:
+-----------------+
| Tables_in_zm |
+-----------------+
| config |
| controlpresets |
| controls |
| devices |
| event_summaries |
| events |
+-----------------+
The only thing I see in this is that "zm.Events" is capitalized and the table that's being created is not, but who am I to know what the heck is going on?
Anyone know how I can get this new ZM up and running with the old data and events in tact? I've had both instances off for a few days now so I'm not writing new information to the database, but I need to get this back online. Thanks in advance.
I'm moving ZM from a Truenas Jail to an Unraid Docker container. The new ZM is up and running on the Unraid box as a docker container and has no data or events.
The event path for the new instance is `/var/cache/zoneminder/events`.
I've stopped ZM on both Truenas and Unraid from the ZM console. I've rsync'd the entire events folder from the truenas jail to the new events location. Now I need to restore the database.
On the Truenas box, I ran `mysqldump -p zm > zm-dbbackup.sql' then copied that file to the new events folder so the new ZM shell can see it.
When I run `mysql -p zm < zm-dbbackup.sql` I get an error:
ERROR 1146 (42502) at line 331: Table 'zm.Events' doesn't exist
If I `use zm;` and then `show tables;` I see the following:
+-----------------+
| Tables_in_zm |
+-----------------+
| config |
| controlpresets |
| controls |
| devices |
| event_summaries |
| events |
+-----------------+
The only thing I see in this is that "zm.Events" is capitalized and the table that's being created is not, but who am I to know what the heck is going on?
Anyone know how I can get this new ZM up and running with the old data and events in tact? I've had both instances off for a few days now so I'm not writing new information to the database, but I need to get this back online. Thanks in advance.