Skip to content

File Transfers

ddamoursNRC edited this page Mar 13, 2021 · 22 revisions

Mac OSX / Linux

To copy a file to the trixie server, please use the scp command. Please note that for external collaborators, the use of this method requires that your system be configured as detailed in the Advanced SSH Configuration section above in order to provide a direct link between your local machine and the trixie server.

The following command will copy the file test.txt from John Doe’s local machine to his admin.john.doe account on trixie. Please note that using trixie as the hostname will only work if you have set up the advanced SSH configuration using ProxyPass as detailed in the user's guide.

scp test.txt trixie:/home/admin.john.doe

To copy a file from trixie to your local machine, you basically reverse the arguments to the scp command.

scp trixie:/home/admin.john.doe/test.txt test.txt

To copy an entire directory instead of just a file, please use the –r option (for recursive) to the scp command.

scp –r myWorkFilesDir trixie:/home/admin.john.doe

Windows

To copy a file to the trixie server, please use the pscp command.

For non-NRC users, please note that the use of this method requires that you have two Putty profiles defined.

  1. A profile for the bastion server
  2. A profile for the trixie server

The bastion profile was likely created in the Accessing Trixie with LoginTC 2-Factor Authentication section under the Initialize SSH Connection with Windows sub-section. If you did not create one previously, please see that section to create the bastion profile. Follow the procedure below to create the trixie profile. Under Session

  1. Set Host Name (or IP address): <admin.firstname.lastname>@trixie.res.nrc.gc.ca
  2. Set Port: 22
  3. Add a name for Saved Sessions – perhaps Trixie-pscp
  4. Click Save

Once you have the profiles created and saved, please follow the procedure below to run the pscp command.

  1. Load the Bastion profile and click Open
  2. Login to the bastion server and leave the window open
  3. Open a Command Prompt window
  4. Use the pscp command in the Command Prompt window to copy files to or from the trixie server using the Trixie-pscp putty profile a. Copy the file test.txt from John Doe’s local machine to his admin.john.doe account on trixie pscp test.txt Trixie-pscp:/home/admin.john.doe b. To copy a file from trixie to your local machine, you basically reverse the arguments to the pscp command pscp Trixie-pscp:/home/admin.john.doe/test.txt test.txt c. To copy an entire directory instead of just a file, please use the –r option (for recursive) to the pscp command pscp –r myWorkFilesDir Trixie-pscp:/home/admin.john.doe

Copy Files to a Project Folder

Shared project work and files should be placed in the shared project location under the following folder hierarchy /gpfs/projects/<project-group>/ Where project-group is the name of your project group – for example, AI4D or COVID. To copy files to a project folder you should create a folder under the project directory and then copy files from your home directory to the new folder. In the example below user John Doe will copy two dataset files to the AI4D/bio-01 project folder.

  1. Change directory to the project folder cd /gpfs/projects/AI4D/bio-01
  2. Create the new folder using a unique name, perhaps your last name and first initial mkdir doej
  3. Change back to your home directory cd
  4. Copy the files to your new project directory cp dataset1.dat dataset2.dat /gpfs/projects/AI4D/bio-01/doej