Trac 1.4.2 Hotcopy -> TracError: Unsupported database type "postgres"

19 views
Skip to first unread message

Rob Hills

unread,
Apr 12, 2022, 12:30:13 PMApr 12
to Trac Users
Hi,

I'm running Trac 1.4.2 and I'm about to move  it to a different server.  I'm using Postgresql as my DB.

When I try to create a backup as described here with the command
  trac-admin /path/to/my/project hotcopy /path/to/backup/dir

I get this error message:

Error: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

The docco doesn't give any indication that this shouldn't work with Postgresql.

I gather from googling that I can use the --no-database flag to stop it backing up the DB and then use pg_dump or similar to backup the DB, but shouldn't the hotcopy command work?

TIA,

Rob Hills
Waikiki, Western Australia

Ryan Ollos

unread,
Apr 12, 2022, 4:37:02 PMApr 12
to Trac Users
trac-admin isn't finding the psycopg2 library. Running the following may provide some clues:

$ pip list
$ which trac-admin

Then look for, is the "trac-admin" associated with the same Trac installation that is running with the webserver? 

Ryan
 

Rob Hills

unread,
Apr 14, 2022, 3:31:00 AMApr 14
to Trac Users
Many thanks Ryan.  It has been a while since I installed trac on this particular server and I'd forgotten the virtualenv configuration I'd used for it.  There were of course two trac-admins and I wasn't running the one inside the virtualenv.  Now all sorted.

Cheers,

Rob Hills
Waikiki, Western Australia

Reply all
Reply to author
Forward
0 new messages