Edgewall Software
Modify

Opened 20 years ago

Last modified 14 years ago

#1380 new defect

trac-admin wiki dump doesn't include attachments

Reported by: rogerb@… Owned by:
Priority: normal Milestone: unscheduled
Component: attachment Version: 0.8.1
Severity: normal Keywords:
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If you use trac-admin wiki dump then attachments aren't included as part of the dump. None of the other trac-admin commands let you get the attachments either. This makes it very difficult to get a true dump of the wiki contents

Attachments (0)

Change History (9)

comment:1 by Matthew Good, 19 years ago

Resolution: wontfix
Status: newclosed

The attachments are just stored in a folder of the project environment, so you can copy the folder directly.

comment:2 by pkou at ua.fm, 18 years ago

Resolution: wontfix
Status: closedreopened

Copying attachments does not solve the issue because they need to be registered in Trac database.

Scenario:

  • Have a wiki page with an attachment in project A.
  • Create empty project B.
  • trac-admin project/A wiki dump tmpdir
  • trac-admin project/B wiki load tmpdir
  • cp -R project/A/attachments/wiki/* project/B/attachments/wiki
  • Open the wiki page in project B.

Actual result: attachments are not available.

Expected result: attachments are copied during wiki dump/load cycle.

comment:3 by Christian Boos, 18 years ago

Keywords: attachment added
Milestone: 1.0

comment:4 by Christian Boos, 16 years ago

Component: generalattachment
Keywords: attachment removed
Milestone: 1.00.13

r7939 goes half-way to solve this one as well.

What's still needed is attachment import.

comment:5 by Remy Blank, 15 years ago

Milestone: next-major-0.1X0.13
Owner: changed from Jonas Borgström to Remy Blank
Status: reopenednew

in reply to:  4 comment:6 by Remy Blank, 14 years ago

Replying to cboos:

r7939 goes half-way to solve this one as well.

What's still needed is attachment import.

There's already attachment export and attachment add to retrieve and set a single attachment, respectively. Isn't that sufficient?

Should we add attachment dump to export all attachments of a resource to a directory, and attachment import to import all files in a directory as attachments of a resource? What about the attachment descriptions? Strictly speaking, this can already be achieved with the single-file commands, attachment list and a bit of scripting.

Suggesting "worksforme" or "fixed in [7939]".

comment:7 by Christian Boos, 14 years ago

Well, that would certainly mean lot of scripting for the use case depicted in comment:2. I would rather leave that as unscheduled until someone provides a way to smoothly integrate the attachments export/import as part of the wiki dump/load cycle.

For example, given the hierarchy:

PageOne (with attachments a.png, b.png)
PageOne/SubPage (with attachment c.png)

An enhanced wiki dump could extract:

- PageOne.wiki
- PageOne.attachments/
  - a.png
  - b.png
- PageOne/
  - SubPage.wiki
  - SubPage.attachments/
    - c.png

and a corresponding enhanced wiki load would be able to recreate the hierarchy (possibly rooted elsewhere), together with the attachments.

comment:8 by Remy Blank, 14 years ago

Milestone: 0.13unscheduled
Owner: Remy Blank removed

Understood. If the use case is to copy a wiki page with all its attachments from one environment to another, a wiki copy operation that operates on two environments could be even more useful. It would allow copying the page (optionally with its history, comments, authors and dates) and all attachments (including descriptions, authors and dates). Doing this in a separate script would actually be fairly easy, so I wonder if we shouldn't even resolve this ticket to "wontfix".

comment:9 by Thijs Triemstra, 14 years ago

Cc: Thijs Triemstra added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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