Skip to main content
AMacd.1
Senior
May 29, 2025
Solved

Project files not found when copying workspace from one machine to another

  • May 29, 2025
  • 3 replies
  • 569 views

Both of the machines are Linux; Computer1 is Pop!_OS 22.04LTS and Computer2 is Ubuntu 22.04LTS

I have been tring to use rsync to copy my workspace from Computer1 to Computer2 so I can continue the work on the second machine.

The problem is that when I try to access the workspace on the second machine, my project cannot be found.

Here are the details.

====

On Computer1, my workspace is located on the main drive at this path:

/home/AccountName1/workspaces/workspace1

My project, named Blinky, which contains, among other things, the .project file, is located in workspace1:

/home/AccountName1/workspaces/workspace1/Blinky/.project

====

On Computer2, my workspace is to be located on a 2nd drive at the following path:

/media/AccountName2/Data/workspaces/workspace1

I expect my project will be located there:

/media/AccountName2/Data/workspaces/workspace1/Blinky

====

Here is how I rsync my workspaces from Computer1 (local) to Computer2 (remote):

rsync -av --delete /home/AccountName1/workspaces AccountName2@Computer2:/media/AccountName2/Data

====

Problem behaviour: After I perform the rsync operation, I go to Computer2, start up STM32CubeIDE, and browse to the workspace. When the workspace's project folder appears in the Project Explorer window, it shows up as a plain folder icon. When I double-click on it, I get the following message:

'Open Project' has encountered a problem.
The project description file (.project) for 'Blinky' is missing. This file contains important information about the project. The project will not function properly until this file is restored.

Working around this bug is awkward at best:

1. Quit STM32CubeIDE on Computer2
2. Nuke the .metadata directory in workspace1 on Computer2.
3. Start up STM32CubeIDE on Computer2. Workspace selector popup appears.
4. At the select Worspace Browse to workspace1 on Computer2 (/media/AccountName2/Data/workspaces/workspace1)
5. Because the .metadata directory was nuked, the Information Center comes up like it would for a new install.
6. Click on Import Project button in Information Center or from the menu bar, click File -> Open Projects from File System
7. Browse to the workspace directory, select the desired project directory, (/media/AccountName2/Data/workspaces/workspace1/Blinky) and click Finish.

Now the project appears correctly.

Question: How can I avoid having to nuke the .metadata and import the project every time I transfer from these two different computers?

Best answer by Pavel A.

Command rsync makes exact copy of all workspace files to destination, including the .metadata folder. This is not a supported way to get a project on another machine where the paths are different. Ideally to update another machine you commit changes of project files only, not including the eclipse metadata, to version control and pull the changes on another machine. This works.

 

3 replies

Ghofrane GSOURI
Technical Moderator
May 29, 2025

Hello @AMacd.1 

First let me thank you for posting.

I'm currently investigating this, I will get back to you as soon as possible.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Pavel A.
Pavel A.Best answer
Super User
May 29, 2025

Command rsync makes exact copy of all workspace files to destination, including the .metadata folder. This is not a supported way to get a project on another machine where the paths are different. Ideally to update another machine you commit changes of project files only, not including the eclipse metadata, to version control and pull the changes on another machine. This works.

 

AMacd.1
AMacd.1Author
Senior
May 29, 2025

@Pavel A.,

OK, I figured I'd have to do that, after I went back and started reading a few other questions that seemed similar.  Copy the project files, not the workspace.  I was hoping for some supported setting or feature I could enable to take care of this.  Of course, this means that every different sandbox you're working on ends up appearing in the IDE's Project Explorer.  I'm going to hear alot of grumbles from the other devs that are used to how things work in IAR!