Edgewall Software
Modify

Opened 13 years ago

Closed 12 years ago

#6627 closed defect (fixed)

hotcopy fails in 0.11b1 on Windows with pysqlite-2.4.0

Reported by: goran.wallgren@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: admin/console Version: 0.11b1
Severity: major Keywords:
Cc: goran.wallgren@…, scottb@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This bug is closely related to #1123 - it has reappeared because of a new journal file in that (newer) version of SQLite.

It can hopefully be solved in the same way: if the journal file is not needed for a hotcopy, it can be added to the "skip" list inside "Python/Lib/site-packages/trac/admin/console.py".

Here are the errors I received:

Hotcopying E:\Dev\trac\susrepo1.db to e:/Dev/Backups/susrepo1.db.trac_hotcopy ..
.
Traceback (most recent call last):
  File "E:\dev\python24\scripts\trac-admin-script.py", line 7, in ?
    sys.exit(
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 1194, in
run
    return admin.onecmd(command)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 102, in o
necmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "E:\Dev\Python24\Lib\cmd.py", line 219, in onecmd
    return func(arg)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 1140, in
do_hotcopy
    copytree(self.__env.path, dest, symlinks=1, skip=skip)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 64, in co
pytree
    copytree(srcname, dstname, symlinks, skip)
  File "E:\Dev\Python24\Lib\site-packages\trac\admin\console.py", line 71, in co
pytree
    raise shutil.Error, errors
shutil.Error: [('E:\\Dev\\trac\\susrepo1.db\\db\\trac.db-stmtjrnl', u'e:/Dev/Bac
kups/susrepo1.db.trac_hotcopy\\db\\trac.db-stmtjrnl', <exceptions.IOError instan
ce at 0x01005D50>)]

Attachments (0)

Change History (5)

comment:1 by anonymous, 13 years ago

Cc: goran.wallgren@… added; goran.wallgren@… removed

Sorry, my email address is goran.wallgren@…

comment:2 by goran.wallgren@…, 13 years ago

To clarify, the name of the new journal file is "trac.db-stmtjrnl"

A quick fix is to replace the line

skip = ['%s-journal'  % os.path.join(self.__env.path, db_path)]

with

skip = ['%s-journal'  % os.path.join(self.__env.path, db_path),
        '%s-stmtjrnl' % os.path.join(self.__env.path, db_path)]

comment:3 by scottb@…, 12 years ago

Cc: scottb@… added

comment:4 by Christian Boos, 12 years ago

Owner: changed from Christopher Lenz to Christian Boos
Priority: normalhigh

Reproduced with pysqlite-2.4.1 as well.

comment:5 by Christian Boos, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r6484 for trunk and r6485 for 0.10.5.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.