Registration/SSH/rrsync

From bwHPC Wiki
< Registration‎ | SSH
Revision as of 16:30, 8 November 2023 by M Janczyk (talk | contribs) (Created page with "= RSYNC for SSH Command Keys = If you want to use rsync for SSH command keys, you normally need one SSH key per directory that you want to synchronize. With rrsync you can us...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

RSYNC for SSH Command Keys

If you want to use rsync for SSH command keys, you normally need one SSH key per directory that you want to synchronize. With rrsync you can use one SSH key per main directory.

Usage

You can find all the options in the man page for rrsync. Below we provide some useful examples for daily use on the bwHPC clusters.

If you want to copy files from your home directory but only want to allow read operations, you can use the following SSH command:

/usr/local/bin/rrsync -ro /home/aa/aa_bb/aa_abc1/
Add command SSH key to service.

Then you can run the following rsync command (replace login.cluster.bw with the node you want to use):

rsync -av login.cluster.bw:homesubdir/ localsubdir/

For read-only access to your workspaces, you could use the following command:

rsync -av localsubdir/ login.cluster.bw:homesubdir/
/usr/local/bin/rrsync error: sending to read-only server is not allowed

For write-only access to your workspaces, you could use the following command:

/usr/local/bin/rrsync -wo /workspace/aa_abc1-abc-0
Add command SSH key to service.
Attention.svg

With rrsync, you must use relative paths starting from the configured path in your SSH command.

Then you could run the following rsync command (replace login.cluster.bw with the node you want to use and your user home):

rsync -av localsubdir/ login.cluster.bw:workspacesubdir/

Reading is not permitted with read-only access.

rsync -av login.cluster.bw:workspacesubdir/ localsubdir/
/usr/local/bin/rrsync error: reading from write-only server is not allowed

If you do not want to restrict read or write access, simply omit '-ro' or '-wo' from your SSH command:

/usr/local/bin/rrsync -ro /home/aa/aa_bb/aa_abc1/


rrsync Path on the Clusters

If you want to use the rrysnc command, you must specify the following paths on the clusters:

  • bwUniCluster2.0:
/usr/bin/rrsync
  • HELIX/NEMO:
/usr/local/bin/rrsync