I am looking to migrate my ZM setup to a new server (dual 3.0GHz with hyperthreading, as opposed to my current setup of dual 3.0GHz without), and was hoping there was an easy way to backup my database config (including all zones per camera) and then just restore it on the new server. It would be extremely time consuming to try to come up with lining up and tweaking all the zones again to get it to my current layout. I'm not very familiar with MySQL, and wouldn't know the first thing about which tables would be needed for what.
Try to install PHPMyadmin. Then select the ZM database and do a backup of the database selecting all the tables and exporting them in SQL format.
After installing the new server, do the opposite, install phpmyadmin, install zoneminder, that will create an empty database. After this, import the stored SQL database to the new system.
Hope it helps,
Mon Mar 07, 2011 7:26 am
Joined: Wed Jan 11, 2006 1:19 pm Posts: 442
Actually, that is often a lot of faff since phpmyadmin won't accept large incoming files to restore. You can copy the dumpfile locally and import from there, but even then often times out.
If you just want the setup and not the events, then phpmyadmin is handy since you just select all the tables except events (the really large one) and do as PacoLM says.
That creates DUMPFILE.SQL containing everything from zm's database. Copy that file to the new machine with zoneminder already installed (but stopped) and add it to mysql with;
mysql --user=XXXXXXXX --password=XXXXXXXX zm < /PATH/TO/DUMPFILE.SQL
Remember to copy turn off zm before importing the new db, and to copy across all the jpg files (/var/cache/zoneminder by default). If you don't copy across the jpgs, zmaudit will kill all your new events as orphans. (But will keep your events, monitors etc)
Only when both bits are installed can you restart zm and check all is good.
Mon Mar 07, 2011 7:37 am
Joined: Thu Apr 26, 2007 3:35 am Posts: 146
This is great info. I also found this posting, though Ubuntu it should be close:
One problem.....it's been so long since I installed this, I can't remember my password for MySQL. I'm sure it's in a config file somewhere, but I can't figure it out. I don't see it in the config from the UI.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum