Difference between revisions of "Tarring projects"

From Dynamo
Jump to navigation Jump to search
Line 9: Line 9:
 
== Differences with the system command <tt>tar</tt>==
 
== Differences with the system command <tt>tar</tt>==
  
Do not use the system <tt>tar</tt> command to create a tarred version of a project!! While their functionalities are similar they do '''not'''work the same way.
+
Do not use the system <tt>tar</tt> command to create a tarred version of a project!! While their functionalities are similar they do '''not''' work the same way.
  
In a ''Dynamo''project, you may have linked tables,templates, and masks which are in the path of your machine, but not in the project folder. In your system, the project will look for these elements in the local file structure.  
+
In a ''Dynamo''project, you may have linked files ad directories (representing tables, templates, and masks) which are in the path of your machine, but not in the project folder. In your system, during runtime the project will look for these elements in the local file structure. Thus, just planting the project folder structure in a different environment (as the OS command <tt>tar</tt> would do) will fail.
  
<tt>dvtar</tt> will make copies of all the linked files into the project folder, and will direct the project to look for the elements (tables, templates, etc....) in their location relative to the project folder. This way you can move the folder to another location.
+
<tt>dvtar</tt>, on the other hand,  will make copies of all the linked files into the project folder, and will direct the project to look for the elements (tables, templates, etc....) in their location relative to the project folder. This way you can safely move the folder to another location.
  
  

Revision as of 09:34, 24 August 2016

Tarring projects is the technique of compacting all information in a project in a single file (called tarball). This file can be then copied to a different machine network. to be executed there.

There are several main scenarios where you may want to tar projects

  • You are using a local workstation to design projects, as the memory of the workstation gives you an immediate feedback (when, for instance, designing masks, looking at particles, etc). When all the setup work is done, the projects is to be ran in different remote machine .
  • You ran a project in a remote machine where graphical operations are slow, and want to examine the results on your more powerful local machine.
  • You are collaborating with other researchers. They ran a project and sent it to you so that you can examine the results.


Differences with the system command tar

Do not use the system tar command to create a tarred version of a project!! While their functionalities are similar they do not work the same way.

In a Dynamoproject, you may have linked files ad directories (representing tables, templates, and masks) which are in the path of your machine, but not in the project folder. In your system, during runtime the project will look for these elements in the local file structure. Thus, just planting the project folder structure in a different environment (as the OS command tar would do) will fail.

dvtar, on the other hand, will make copies of all the linked files into the project folder, and will direct the project to look for the elements (tables, templates, etc....) in their location relative to the project folder. This way you can safely move the folder to another location.


Command line syntax

The full syntax description can be found here dthelp.

dvtar myProject

will create a tarball myProject.tar which includes all linked files, but not the data.

dvtar myProject -data 1

to pass also the data

Transferring data

It is possible to transfer the data inside the tarball. This is only useful when the size of the data set is rather small, probably for demonstration purposes. In real projects, you don't want to transfer around files of several Gb continuously. It is often the case that you have your data in a local location, and a copy of it in a remote location. In such cases, you will want to relink the data in the project untarred in the target machine.

This can be easily done with the dvput command: dvput myProject -data dataInRemoteSystem where nameOfDataInRemote is the name of the data folder in the remote machine.