Migrate project files from a penpot instance to another

Hi All !

Need help please!

I have some related (linked) files, and I want to migrate them from a first instance of penpot to another penpot instance.

When I Export/Import, the linked files are duplicated. Example:
Pr_1 linked to Pr_2
Pr_3 linked to Pr_1
Pr_4 linked to Pr_1 and Pr_2

When I Export/Import, the Pr_1 is created 3 times (it self, linked to Pr_3, linked to Pr_4).

Same issue for all linked projects, the linked one is duplicated for a third party and not linked as well as it is in the first instance of penpot.

Can you help me to fix it ?

Thanks a lot

Best regards

1 Like

Are the files linked because they’re using/include the same libraries?

Hi,

Yes:

  • Pr_1 is a library used by Pr_3 and Pr_4
  • Pr_2 is a library used by Pr_1 and Pr_4

And when I download them (penpot files), I select the first option of “Export Files” : Export shared libraries.

Thanks a lot,

Best regards

1 Like

Are you doing this option when you export each file? I think that might be why you’re getting duplicates. Because each downloaded file has its own version of the connected libraries.

When exporting files using the export shared libraries option, you shouldn’t need to download the library files at all, as these will be included with your files.

I believe if you download Pr_4 and export shared libraries, then Pr_1, Pr_2 and Pr_4 should work as expected. But Pr_3 is tricky, because exporting that with shared libraries would end up with a duplicate of Pr_1.

A workaround for this is to:

  1. Publish Pr_3 as a(n empty) library.
  2. Connect the Pr_3 library to the Pr_4 file.
  3. Export Pr_4 with shared libraries
  4. Import your downloaded file to get all files with libraries connected and references working.
  5. If you want, you can then disconnect the Pr_3 library from the Pr_4 file and unpublish Pr_3 as a library.

If your use case is for sharing the project with other people, using a team would definitely be an easier solution. But if you’re trying to duplicate files with libraries to other projects, this is probably a reasonable workaround.

Does that make sense?!

I should say for anyone reading this who finds all the numbers confusing, the short version is this:

If you want to export a collection of files that include multiple files referencing the same libraries, choose the file that references the most libraries as your download point. For any other files that are not referenced by the download point file, publish them as empty libraries, and connect them as libraries to the download point file. Then Download Penpot file from the download point file, using the export shared libraries option. Once you’ve imported your file to another instance, you can safely disconnect and unpublish the empty library files.

Maybe an Export project option could be valuable to other folks with this use case?

1 Like

Hi,

I tried this “Workaround” below, and it works.

Workaround:

  1. Mark all files I want to export as a library by publishing them in Penpot.

  2. Create an empty Penpot file. This file will maintain all connections.

  3. Link all the libraries to this empty file.

  4. Export the empty file; at this point, all connections between files are preserved.

  5. Import the “emplty.penpot" file into the new Penpot instance. The dependencies still functional.

  6. Delete the empty file.

  7. unpublish files that are not meant to be libraries.

2 Likes