How do you update...

Support and queries relating to all previous versions of ZoneMinder
Locked
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

How do you update...

Post by yosco »

I've read through the instructions and there are no real update instructions I can find, Only some verbage in the install procedure. Can someone point me to a step by step update doc? Or should I uninstall and install the new version, I couldn't find any uninstall instructions either. Please help.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Which version of ZM?
Packaged or unpackaged (RPM or Source)?
What linux flavor?
I'll try to put together instructions for you as soon as I can.
Regards,
Cordel
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Post by yosco »

I currently have 0.9.16 build from source and updating from source, Since I'm using SUSE source was my only option. Thanks for your help. Even just some syntax as to what commands I want to run would help push me in the right directions.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

In more recent versions updating is controlled by the zmupdate script however your version is probably a bit beyond that. Essentially you need to run all the applicable zmalter scripts sequentially in the db directory to bring your database up to date.

It mainly depends on what you want to keep from your older version. If you just want to keep your settings then this probably sufficient however some other things have changed in the meantime which zmupdate will do but which you will have to run yourself.

This is the help from zmupdate

Code: Select all

Usage: zmupdate.pl <-c,--check|-r,--rename|-z,--zone-fix|-v<version>,--version=<version> [-u<dbuser> -p<dbpass>]>
Parameters are :-
-c, --check                      - Check for updated versions of ZoneMinder
-r, --rename                     - Rename images from old 'capture-nnn.jpg' format to new 'nnn-capture.jpg' style from v1.17.2
-z, --zone-fix                   - Update zone percentage sizes from %ge of image to %ge of zone from 1.18.2 onwards
-v<version>, --version=<version> - Upgrade to the current version from <version>
-u<dbuser>, --user=<dbuser>      - Alternate DB user with privileges to alter DB
-p<dbpass>, --pass=<dbpass>      - Password of alternate DB user with privileges to alter DB
Phil
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Post by yosco »

Running version 0.9.16 How do run zmalter? I get an error when running:

Code: Select all

linux:/zm-1.20.1/db # ./zmalter-0.9.16.sql
./zmalter-0.9.16.sql: line 1: --: command not found
./zmalter-0.9.16.sql: line 2: --: command not found
./zmalter-0.9.16.sql: line 3: --: command not found
./zmalter-0.9.16.sql: line 4: --: command not found
./zmalter-0.9.16.sql: line 5: --: command not found
./zmalter-0.9.16.sql: line 6: syntax error near unexpected token `('
./zmalter-0.9.16.sql: line 6: `alter table Users add column Language varchar(8) not null default "" after Password;'
Thanks for your help
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

How to use zmalter

Post by cordel »

Sorry but I've been working 14 to 16 hour days so I havent't gotten around to compleating this. To update the DB useing the zmalter scripts the syntax is as follows:
cd into the directory with the scripts.

Code: Select all

mysql zm < zmalter-0.9.16.sql -u root -p
zm -being the name of the database
- u root -tells it to run as the root user for the database
-p tells it that a password is required which it will ask for after you start the script. This is not the same as your root user that you login to your console or desktop with. Also normaly the root password is blank so just press enter unless you have added a password (you sould).

Repeat with all scripts sequntialy from your version up.

Cheers,
Cordel
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Post by yosco »

I tried some of the zmalter script and started getting errors on the second one:

Code: Select all

linux:/zm-1.20.1/db # mysql zm < zmalter-1.17.1.sql -u admin -p
Enter password:
ERROR 1091 at line 8: Can't DROP 'ImagePath'. Check that column/key exists
linux:/zm-1.20.1/db # mysql zm < zmalter-1.17.1.sql -u admin -p
Enter password:
ERROR 1054 at line 6: Unknown column 'AlarmThreshold' in 'Zones'
linux:/zm-1.20.1/db # mysql zm < zmalter-1.17.1.sql -u admin -p
Enter password:
ERROR 1054 at line 6: Unknown column 'AlarmThreshold' in 'Zones'
From reading other posts, I'm thinking that the updates are not complete scripts anyway.

What would be the easiest way to remove and re-install the lastest version?

-Scott
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You can just 'drop' your ZM database in MySQL to remove it entirely. That's probably the only thing you would need to do, though your could delete the files in your ZM web directory also.

Phil
Locked