currently running
$version = 2003091111; // The current version is a date (YYYYMMDDXX)
$release = "1.1.1"; // User-friendly version number
trying to upgrade to 1.2
-- installed 1.2 in new directory
-- copied uploaded content, themes etc. & changed config.php accordingly
-- copied old (1.1.1) mysql database into new database & changed config.php accordingly
-- access new moodle installation & get stuck with errors that tables mdl_backup_* already exist; clicking on continue just brings the same page
-- this is not a lie, because I am upgrading -- so silly moodle should be able to upgrade these tables, rather than complaining ? I don't call this a stable upgrade
-- or am I stupid ???
---- follows: dump of error
Upgrading database
Home -> Upgrading database
(mysql): CREATE TABLE `mdl_backup_files` ( `backup_code` int(10) unsigned NOT NULL default '0', `file_type` varchar(10) NOT NULL default '', `path` varchar(255) NOT NULL default '', `old_id` int(10) unsigned default NULL, `new_id` int(10) unsigned default NULL, PRIMARY KEY (`backup_code`, `file_type`, `path`)) TYPE=MyISAM COMMENT='To store and recode ids to user and course files.'
1050: Table 'mdl_backup_files' already exists
adodb_mysql._execute(CREATE TABLE `mdl_backup_files` ( `backup_code` int(10) unsigne..., false) % line 781, file: adodb.inc.php
adodb_mysql.execute(CREATE TABLE `mdl_backup_files` ( `backup_code` int(10) unsigne...) % line 16, file: datalib.php
execute_sql() % line 71, file: datalib.php
modify_database() % line 338, file: lib.php
upgrade_backup_db(CREATE TABLE `mdl_backup_files` ( `backup_code` int(10) unsigne...) % line 208, file: index.php
Error
(mysql): CREATE TABLE `mdl_backup_ids` ( `backup_code` int(12) unsigned NOT NULL default '0', `table_name` varchar(30) NOT NULL default '', `old_id` int(10) unsigned NOT NULL default '0', `new_id` int(10) unsigned default NULL, `info` mediumtext, PRIMARY KEY (`backup_code`, `table_name`, `old_id`)) TYPE=MyISAM COMMENT='To store and convert ids in backup/restore'
1050: Table 'mdl_backup_ids' already exists
adodb_mysql._execute(CREATE TABLE `mdl_backup_ids` ( `backup_code` int(12) unsigned ..., false) % line 781, file: adodb.inc.php
adodb_mysql.execute(CREATE TABLE `mdl_backup_ids` ( `backup_code` int(12) unsigned ...) % line 16, file: datalib.php
execute_sql() % line 71, file: datalib.php
modify_database() % line 338, file: lib.php
upgrade_backup_db(CREATE TABLE `mdl_backup_ids` ( `backup_code` int(12) unsigned ...) % line 208, file: index.php
Error
(mysql): CREATE TABLE `mdl_backup_config` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `value` varchar(255) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`)) TYPE=MyISAM COMMENT='To store backup configuration variables'
1050: Table 'mdl_backup_config' already exists
adodb_mysql._execute(CREATE TABLE `mdl_backup_config` ( `id` int(10) unsigned NOT NU..., false) % line 781, file: adodb.inc.php
adodb_mysql.execute(CREATE TABLE `mdl_backup_config` ( `id` int(10) unsigned NOT NU...) % line 16, file: datalib.php
execute_sql() % line 71, file: datalib.php
modify_database() % line 338, file: lib.php
upgrade_backup_db(CREATE TABLE `mdl_backup_config` ( `id` int(10) unsigned NOT NU...) % line 208, file: index.php
Error
(mysql): CREATE TABLE `mdl_backup_courses` ( `id` int(10) unsigned NOT NULL auto_increment, `courseid` int(10) unsigned NOT NULL default '0', `laststarttime` int(10) unsigned NOT NULL default '0', `lastendtime` int(10) unsigned NOT NULL default '0', `laststatus` varchar(1) NOT NULL default '0', `nextstarttime` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `courseid` (`courseid`)) TYPE=MyISAM COMMENT='To store every course backup status'
1050: Table 'mdl_backup_courses' already exists
adodb_mysql._execute(CREATE TABLE `mdl_backup_courses` ( `id` int(10) unsigned NOT N..., false) % line 781, file: adodb.inc.php
adodb_mysql.execute(CREATE TABLE `mdl_backup_courses` ( `id` int(10) unsigned NOT N...) % line 16, file: datalib.php
execute_sql() % line 71, file: datalib.php
modify_database() % line 338, file: lib.php
upgrade_backup_db(CREATE TABLE `mdl_backup_courses` ( `id` int(10) unsigned NOT N...) % line 208, file: index.php
Error
(mysql): CREATE TABLE `mdl_backup_log` ( `id` int(10) unsigned NOT NULL auto_increment, `courseid` int(10) unsigned NOT NULL default '0', `time` int(10) unsigned NOT NULL default '0', `laststarttime` int(10) unsigned NOT NULL default '0', `info` varchar(255) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM COMMENT='To store every course backup log info'
1050: Table 'mdl_backup_log' already exists
adodb_mysql._execute(CREATE TABLE `mdl_backup_log` ( `id` int(10) unsigned NOT NULL ..., false) % line 781, file: adodb.inc.php
adodb_mysql.execute(CREATE TABLE `mdl_backup_log` ( `id` int(10) unsigned NOT NULL ...) % line 16, file: datalib.php
execute_sql() % line 71, file: datalib.php
modify_database() % line 338, file: lib.php
upgrade_backup_db(CREATE TABLE `mdl_backup_log` ( `id` int(10) unsigned NOT NULL ...) % line 208, file: index.php
Error
Backup tables could NOT be set up successfully!
upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
Number of replies: 6Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
You shouldn't have copied the old database in a new database.
The upgrade procedure is:
- Make backups (of course)
- Delete all files in your moodle programfolder on your server
- upload the new moodle programfiles to your server
- copy config-dist to config.php and edit it according to your settings
- go to the moodle/admin and the upgrade proceeds.
You don't have to do anything with your database yourself, just make a backup of it.
Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
>You shouldn't have copied the old database in a new database.
nice suggestion ....
I want to keep my current moodle 1.1.1 installation up and runnig & duplicate it in a second installation for upgrade
& only go live with upgrade when completely satisfied.
i think this is a completely reasonable approach for a productive environment?
/ pt
nice suggestion ....
I want to keep my current moodle 1.1.1 installation up and runnig & duplicate it in a second installation for upgrade
& only go live with upgrade when completely satisfied.
i think this is a completely reasonable approach for a productive environment?
/ pt
Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
Then I think the best thing you can do is first duplicate your running 1.1.1 and then do the upgrade. That will be the best possible test environment for you and alse the only possible way to perform an upgrade.
Upgrading Moodle normaly runs verry smoothly. I run a productionserver wich I upgrade at least once a mont, since 5/2003 and a testserver on wich I make the translations. The testserver is upgraded 4 or 5 times a week. So count the times I upgraded a Moodleinstallation .
I still have to run to my first upgradeproblem...
Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
Hi Peter,
you can keep your current Moodle 1.1.1 running up and make a duplicate of it to upgrade to 1.2. Really it's a completely reasonable approach for a productive environment. To have a development server to make test is highly recommended too.
I'm not absolutely sure, when you say "installed 1.2 in new directory" if you've installed it at all or no (then, perhaps you made a downgrade when "copied old (1.1.1) mysql database into new database".
So, I recommend following this steps to duplicate your installation an then, upgrade the copy:
1.-Duplicating the installation: Objective. Get and install a working copy of Moodle 1.1.1.
a) Copy your moodle (1.1.1) dir to another dir (moodletest).
b) Copy your moodledata (1.1.1) dir to another dir (moodledatatest).
c) Copy your moodle database (1.1.1) to another database (moodletest).
d) Change (edit) config.php to all your new locations.
e) Test that your test (1.1.1) installation is working.
2.-Upgrading to 1.2: Objective: Upgrade your test working copy to Moodle 1.2
a) Uncompress the 1.2 distribution in your moodletest (1.1.1) dir.
b) Copy the config-dist.php (1.2) to config.php
c) Change (edit) config.php to all your test locations.
d) Login (web) to your test copy. The upgrade process should finish without errors.
e) Test that your test (1.2) installation is working.
Finally, I'm stupid (really) and unstable (too!!) and perhaps I forgot some step, so be careful...(if you can try the steps above in a physically different server...)
Ciao
you can keep your current Moodle 1.1.1 running up and make a duplicate of it to upgrade to 1.2. Really it's a completely reasonable approach for a productive environment. To have a development server to make test is highly recommended too.
I'm not absolutely sure, when you say "installed 1.2 in new directory" if you've installed it at all or no (then, perhaps you made a downgrade when "copied old (1.1.1) mysql database into new database".
So, I recommend following this steps to duplicate your installation an then, upgrade the copy:
1.-Duplicating the installation: Objective. Get and install a working copy of Moodle 1.1.1.
a) Copy your moodle (1.1.1) dir to another dir (moodletest).
b) Copy your moodledata (1.1.1) dir to another dir (moodledatatest).
c) Copy your moodle database (1.1.1) to another database (moodletest).
d) Change (edit) config.php to all your new locations.
e) Test that your test (1.1.1) installation is working.
2.-Upgrading to 1.2: Objective: Upgrade your test working copy to Moodle 1.2
a) Uncompress the 1.2 distribution in your moodletest (1.1.1) dir.
b) Copy the config-dist.php (1.2) to config.php
c) Change (edit) config.php to all your test locations.
d) Login (web) to your test copy. The upgrade process should finish without errors.
e) Test that your test (1.2) installation is working.
Finally, I'm stupid (really) and unstable (too!!) and perhaps I forgot some step, so be careful...(if you can try the steps above in a physically different server...)
Ciao
Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
I'm guessing you made a mistake when you copied the tables.
Re: upgrade 1.1.1 -> 1.2 ERROR "Backup tables ..."
Martin, you're probably right: something went wrong when I copied the tables yesterday. I dropped all the tables, re-created them and added the data & everyting was fine; update took me about 10 minutes ...

Thanks for all your support & moodle on!
Thanks for all your support & moodle on!