hotcopy not working with MariaDB

39 views
Skip to first unread message

Andreas

unread,
Mar 6, 2024, 8:28:03 AMMar 6
to Trac Users
Hello,

I would like to backup our Trac 1.2.5 installation with the following command:

sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup


I get the following result:

Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system WHERE name = 'trachours.db_version'' at line 1")

We have the following setup:

Trac 1.2.5
Database: MariaDB
Host: Ubuntu 20.04

Does anyone have an idea of how to solve this?

Thanks!

Markus Rosjat

unread,
Mar 6, 2024, 8:47:55 AMMar 6
to trac-...@googlegroups.com
Hi Andreas,

best guess here is that your db version doesnt work with the code. I guess it would be helpful for the devs if you provide the mariadb version you are running on the machine.
If i remember correct mariadb had some changes from 10.3  to a higher version regarding syntax.

cheers

Markus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/337044f1-75f0-4870-906f-527209001eb0n%40googlegroups.com.

Jun Omae

unread,
Mar 6, 2024, 8:48:04 AMMar 6
to trac-...@googlegroups.com
On Wed, Mar 6, 2024 at 10:28 PM Andreas <muffe...@gmail.com> wrote:
> I would like to backup our Trac 1.2.5 installation with the following command:
>
> sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup
>
>
> I get the following result:
>
> Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'system WHERE name = 'trachours.db_version''
^^^^^^^^^
> at line 1")

That is an issue of TracHoursPlugin, not Trac. Please report it to
maintainers of the plugin.


--
Jun Omae <jun...@gmail.com> (大前 潤)

RjOllos

unread,
Mar 7, 2024, 1:08:08 PMMar 7
to Trac Users
I believe the issue may have been fixed:

So it's possible upgrading TracHours to the latest trunk version will resolve the issue. 

Jun Omae

unread,
Mar 7, 2024, 7:07:21 PMMar 7
to trac-...@googlegroups.com
The issue is caused by SYSTEM became a reserved word in MySQL 8 and
MariaDB 10.3.
Could you please try attached patch?
trachoursplugin-mysql8.diff
Reply all
Reply to author
Forward
0 new messages