How do you update...
How do you update...
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.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
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
Phil
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
Running version 0.9.16 How do run zmalter? I get an error when running:
Thanks for your help
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;'
How to use zmalter
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.
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
cd into the directory with the scripts.
Code: Select all
mysql zm < zmalter-0.9.16.sql -u root -p
- 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
3939663646337
It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
I tried some of the zmalter script and started getting errors on the second one:
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
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'
What would be the easiest way to remove and re-install the lastest version?
-Scott
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: