Page 1 of 1
[SOLVED] Move ZoneMinder to a new system
Posted: Wed Jan 19, 2011 10:48 pm
by redxiii
edit: Solved. check
this post for commands i used.
---
Hi, i want to move ZM to a new system. I've already installed ZM on the new system, and can access the web interface. I want to transfer all of the events, and camera configurations as well. Both systems are 1.24.2 on Ubuntu 10.04.1 64-bits. I found one thread that said I can backup the database using this command:
Code: Select all
mysqldump zm Config Filters Groups States Users Monitors Zones --add-drop-table > /root/zm-config.sql
Once i've done that and have the zm-config.sql file, how do I import that into the new system?
And then, how do i copy over all of the camera configurations and events?
Thanks
Posted: Wed Jan 19, 2011 11:16 pm
by jani
mysql -uuser -ppass zm < /root/zm-config.sql should do what you want.
Posted: Wed Jan 19, 2011 11:27 pm
by redxiii
thanks.
what about all of the events?
Posted: Thu Jan 20, 2011 12:47 am
by redxiii
i tried using this command, to basically copy /var/cache/zoneminder but, on the new system, in the web interface, it is still showing 0 events for all the camers.
Code: Select all
rsync -r -t -p -o -g -v --progress --delete user@oldSystem:/var/cache/zoneminder/* /var/cache/zoneminder/
but, perhaps that didn't work completely... because the old system has 7.0G in that directory but on the new system it is only reporting 1.6G so a lot didn't get transferred.......
after running the command again, it seems to have transferred everything else... guess there was a hiccup or something. but, still nothing in the web interface.......
Posted: Thu Jan 20, 2011 9:13 pm
by redxiii
i tried a similar command to sync /usr/share/zoneminder:
Code: Select all
rsync -r -t -p -o -g -v --progress --delete user@oldSystem:/usr/share/zoneminder/* /usr/share/zoneminder/
without any luck.
the new system is showing some events (presumably from when ZM was running there and capturing events) but they will not play, probably corrupted or something because of the way i've transferred these files over.
how to sync up the events in the web interface?? thanks
Posted: Thu Jan 20, 2011 10:02 pm
by redxiii
aha! i think i've got it. just took some more persistent searching: move events, moving events, transferring events, transfer events. something finally turned up.
the problem was with the initial mysqldump command.
instead, i used this command:
Code: Select all
root@oldSystem# mysqldump -p zm > /root/zm-dbbackup.sql
and then restored with
Code: Select all
root@newSystem# mysql -p zm < /root/zm-dbbackup.sql
then transferred/synced the events
Code: Select all
root@newSystem# rsync -r -t -p -o -g -v --progress --delete user@oldSystem:/var/cache/zoneminder/* /var/cache/zoneminder/
finally, i ran
now all of the events are showing up in the web interface, and i can view them, and new events are properly being recorded. awesome!