Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

puis les copier de là vers la destination finale. Comme cet espace disque est très limité et partagé entre tous les utilisateurs, il ne peut être utilisé que temporairement! Toutes les données peuvent être effacées après 7 jours!

Lorsque le transfert de vos données est terminé effacez vos données de /transfert/${USER} !!!
Por example, a partir d'un serveur à l'UQAM avec :

            rm -rf /transfert/username/*

Serveurs UQAM ↔ /transfer

...

Voir "3) Outils de transfert" ci-dessous pour savoir comment faire.

3) Outils de transfert

rsync

'rsync' is a utility for transferring and synchronizing files between different directories, which can be on different computers or storage drives, for as long as one is accessible from the other. Have a look at the official web page: rsync manpage 

Syntax:

          rsync [keys...] source... [destination]

Usages with just one source argument and no destination argument will just list the source files instead of copying them.

Keys

These are the keys I find most useful:

keydescription
-vverbose
-uupdate -> skip files that are newer on the receiver
-rrecurse into directories
-tpreserve modification times
-ppreserve permissions -> Do not use when copying files to the Alliance!
-lcopy symbolic links as symbolic links - see note below
-Ltransform symbolic link into referent file/dir - see note below

Note: One can use only either '-l' or '-L'. By default symbolic links will not get transferred!

Source & destination

If the source contains more than one file the destination must be a directory.

Either the source or the destination can be on another computer, that is accessible via ssh.

If one of them is on another computer the source resp. destination location must be preceded by the name of the computer (HOST) and if the username is different also by the username on the remote computer:

      [username@]HOST:source
resp.
      [username@]HOST:destination

Putting transfer command in background

To be able to log out after having started a transfer one can "put the transfer command in the background" the following way:

    rsync [keys] source destination > logfile  2>&1 &

The 'logfile' needs to be specified to be in an existing directory on the local computer. It will contain what usually appears on the scree when executing the command.

Note: One cannot put the transfer command in the background if one needs to enter a password and/or authenticate!!!

You can avoid getting asked to enter a password by adding the content of your public ssh-key from your local computer, for example ~/.ssh/id_rsa.pub, to the file ~/.ssh/authorized_keys on the remote computer.

To avoid having to authenticate when transferring data from/to Narval you will have to follow the steps on our wiki under:
    https://wikienseignement.uqam.ca/display/EDDSDLTEL/Multifactor+authentication#Multifactorauthentication-Automatedworkflows

Examples

a) Narval → UQAM

To copying data from Narval to a computer at UQAM one needs to go on the UQAM computer and fetch the data from Narval with, for example:

    rsync  -ruvtp   username_on_Narval@narval.computecanada.ca:source_on_Narval   directory_at_UQAM

b) UQAM → Narval

To copying data from UQAM to Narval one needs to go on the UQAM computer and push the data from from UQAM, for example:

    rsync  -ruvt  source_at_UQAM   username_on_Narval@narval.computecanada.ca:destination_on_Narval


...

MacOS  ou Linux (nos serveurs)

...


Ouvrez un terminal et transférez les données par exemple avec rsync :

...