While attempting to import (on v0.24.6) an export from another Vikunja instance, I see these errors in the log. They appear to possibly be caused by using the old bucket ID when processing a related task?
2024-12-22T22:32:58-07:00: DEBUG ▶ 480 [Vikunja File Import] Importing a zip file containing 5 files
2024-12-22T22:32:58-07:00: DEBUG ▶ 481 [Vikunja File Import] Found a data file
2024-12-22T22:32:58-07:00: DEBUG ▶ 482 [Vikunja File Import] Found a blob file
2024-12-22T22:32:58-07:00: DEBUG ▶ 483 [Vikunja File Import] Found a filter file
2024-12-22T22:32:58-07:00: DEBUG ▶ 484 [Vikunja File Import] Found a blob file
2024-12-22T22:32:58-07:00: DEBUG ▶ 485 [Vikunja File Import] Found a version file
2024-12-22T22:32:58-07:00: DEBUG ▶ 486 [Vikunja File Import]
2024-12-22T22:32:58-07:00: DEBUG ▶ 487 [creating structure] Creating 2 projects
2024-12-22T22:32:58-07:00: DEBUG ▶ 48a [creating structure] Created project 12
2024-12-22T22:32:58-07:00: DEBUG ▶ 48b [creating structure] Creating 1 buckets
2024-12-22T22:32:58-07:00: DEBUG ▶ 492 [creating structure] Created bucket 22, old ID was 26
2024-12-22T22:32:58-07:00: DEBUG ▶ 496 Sending project created notifications to 0 subscribers for project 12
2024-12-22T22:32:58-07:00: DEBUG ▶ 4ae [creating structure] Creating 30 tasks
2024-12-22T22:32:58-07:00: DEBUG ▶ 4bd [creating structure] Created task 31
2024-12-22T22:32:58-07:00: DEBUG ▶ 4cf [creating structure] Created new label 11
2024-12-22T22:32:58-07:00: DEBUG ▶ 4e2 [creating structure] Associated task 31 with label 11
2024-12-22T22:32:58-07:00: DEBUG ▶ 4e6 Did not find any webhook for the task.updated event for project 12, not sending
2024-12-22T22:32:58-07:00: DEBUG ▶ 4f4 Did not find any webhook for the task.updated event for project 12, not sending
2024-12-22T22:32:58-07:00: DEBUG ▶ 4fe [creating structure] Created task 32
2024-12-22T22:32:58-07:00: DEBUG ▶ 4ff [creating structure] Creating 1 related task kinds
2024-12-22T22:32:58-07:00: DEBUG ▶ 500 [creating structure] Creating 1 related tasks for kind parenttask
2024-12-22T22:32:58-07:00: DEBUG ▶ 516 Did not find any webhook for the task.updated event for project 12, not sending
2024-12-22T22:32:58-07:00: ERROR ▶ 51b [creating structure] Error while creating structure: Bucket does not exist [BucketID: 26]
2024-12-22T22:32:58-07:00: ERROR ▶ 51c could not insert data: Bucket does not exist [BucketID: 26]
The first task (31), which was created successfully, had no related tasks. The second task (32) and third task (33, not mentioned in log) were related, but that relation was not restored. Manually deleting all related_tasks entries in the export allowed it to be imported successfully, albeit without any relations!
(Note, it is not possible due to external reasons to update the exporting server, running v0.21.0, thus why I’m moving my data to another instance.)
I also noticed that the import breaks (converting empty string to int) if there’s a directory entry (files/
) in the zip file, meaning zip -r new.zip *
doesn’t work, needs zip -rD new.zip *
or so. This makes it more fragile in case someone crazy wants to modify it before importing A simple skip if the name is exactly files/
around pkg/modules/migration/vikunja-file/vikunja.go line 80 would prevent that…