Missing attachments after migration from .11 to 1.0.1

202 views
Skip to first unread message

Adrya Stembridge

unread,
Oct 22, 2013, 11:48:54 AM10/22/13
to trac-...@googlegroups.com
I recently migrated data from .11 to 1.0.1.   Everything works fine, except that today I noticed attachments previously added are coming up "not found".  

I copied the attachments data from the old instance to the new instance (putting the contents in /my/path/to/trac/files/).   Still getting "not found" when trying to access a file for a specific ticket.

Here's info from the 1.0.1 trac log: 

2013-10-22 11:34:28,439 Trac[attachment] DEBUG: Trying to open attachment at /www/virtualhosts/trac/files/attachments/ticket/5e0/5e06d22c8893e27d5a7243bd185faa94cc593072/6042c584b3941a285daa3af0c34e428bb746f018.jpg
2013-10-22 11:34:28,440 Trac[main] WARNING: [170.140.100.189] HTTPNotFound: 404 Trac Error (Attachment '20130801_111233 (copy).jpg' not found)

Note the folder in the path after ticket.  It shows "5e0" where the ticket is actually "369".   

Do newer versions of trac no longer use the actual ticket number in file paths?  If not, how do I migrate attachments from earlier versions of trac? 

Steffen Hoffmann

unread,
Oct 22, 2013, 3:34:42 PM10/22/13
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Right, your observation is correct. While disputed, this has been
changed to overcome several limitations of the old file store schema
[1]. But the migration is part of an upgrade script, that should be run
when upgrading the environment. If your files have been in place before
you ran the corresponding trac-admin command, then something went wrong,
and you'll probably need to trigger the migration again. But this has
already been discussed recently, so look at the mailing-list archive first.

Steffen Hoffmann


[1] http://trac.edgewall.org/ticket/10313
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlJm000ACgkQ31DJeiZFuHcKbgCgmApONGIYHhSZK2woXMjpix9U
a0UAnR1ZDvsYkB7putAR9pqhDPDJuZz6
=wvLG
-----END PGP SIGNATURE-----

RjOllos

unread,
Oct 22, 2013, 7:10:49 PM10/22/13
to trac-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages