Opened 21 years ago
Last modified 15 years ago
#1380 new defect
trac-admin wiki dump doesn't include attachments
| Reported by: | 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 , 20 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 19 years ago
| Resolution: | wontfix |
|---|---|
| Status: | closed → reopened |
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 tmpdirtrac-admin project/B wiki load tmpdircp -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 , 19 years ago
| Keywords: | attachment added |
|---|---|
| Milestone: | → 1.0 |
follow-up: 6 comment:4 by , 17 years ago
| Component: | general → attachment |
|---|---|
| Keywords: | attachment removed |
| Milestone: | 1.0 → 0.13 |
r7939 goes half-way to solve this one as well.
What's still needed is attachment import.
comment:5 by , 15 years ago
| Milestone: | next-major-0.1X → 0.13 |
|---|---|
| Owner: | changed from to |
| Status: | reopened → new |
comment:6 by , 15 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 , 15 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 , 15 years ago
| Milestone: | 0.13 → unscheduled |
|---|---|
| Owner: | 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 , 15 years ago
| Cc: | added |
|---|



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