Migrate Zoneminder to new server

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Migrate Zoneminder to new server

Post by ckilner » Wed Jun 26, 2019 12:05 pm

I've built a new Ubuntu 18.04LTS server and installed Apache, PHP, MariaDB and Zoneminder 1.32
I now want to migrate Zoneminder from the old server to the new one without losing any events etc.

Is this an easy/possible thing to do?

User avatar
snake
Posts: 249
Joined: Sat May 21, 2016 2:20 am

Re: Migrate Zoneminder to new server

Post by snake » Wed Jun 26, 2019 8:22 pm

Easiest thing to do when migrating is to copy the Monitor configurations only. That will save you if you have greather than a few cameras, from reconfiguring everything. You can backup the old db with mysqldump, restore it to the new server, and then run zmupdate.pl which will auto update the db to 1.32+

You can either copy just the Monitors table, or copy everything. I think some of the fields don't carry over if you just copy Monitors, so I copy everything.
Steps

Code: Select all

(On old server:)
# mysqldump -u zmuser --password=zmpass zm > ./zm_db_backup.sql
(On new server:)
# mysql -u zmuser -p < ./zm_db_backup.sql
# zmupdate.pl
As for copying over events, it should be possible, you just need to make sure the events are in the same format (short, medium, long) that the new storage is set for, and in the same location on the file directory. Then run zmaudit.pl and see if it starts deleting old events. If you make a mistake, you can delete the db, restore the db, and try again. So it's not hard, but there may be some troubleshooting involved.

It will be easier to do this with two separate servers.

See also:
viewtopic.php?f=38&t=27899&p=108791
viewtopic.php?f=36&t=26631&p=102872
viewtopic.php?f=34&t=24405&p=93193
viewtopic.php?f=36&t=26631&p=102872

Basically, if zmaudit looks for the events on the new server and finds them, it will not delete them from the db.

ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Re: Migrate Zoneminder to new server

Post by ckilner » Thu Jun 27, 2019 9:11 am

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests