- Last modified: tor aug 12, 2021 09:13
- Sign: JN
Script for transferring UPPMAX files to backup server on NRM.
The current backup server is named nrmdna01.nrm.se and has limited access.
For transfer, we use rsync over ssh.
Assuming file structure similar to:
-
On rackham:
/proj/projectname/folder/to/transfer
-
On NRM (where
XXX
is a department acronym, currently in use: BIO, BOT, ZOO, andnrmuser
is the user in the Windows ActiveDirectory)/projects/XXX-projects/nrmuser
- From NRM IT-support, get information about
- Name and IP address for the NRM backup computer (below called
nrmcomputer
). - User name on the backup computer (prob. same as your Windows user).
Below called
nrmuser
. - Directory structure on NRM backup computer (e.g.
/projects/BIO-projects
) - How to set up "passwordless communication between uppmax and nrmdna01.nrm.se"
- Name and IP address for the NRM backup computer (below called
- Login to UPPMAX (
rackham.uppmax.uu.se
) - Clone the repository from
https://github.com/NBISweden/backup2nrm.git,
using
git clone https://github.com/NBISweden/backup2nrm.git
- Put the file
backup2nrmdna01
in your PATH (on UPPMAX) - For convenience, edit the
backup2nrmdna01
file to add values for$nrmuser
$email
$department
- (
$nrmpath
) - (
$cpuaccount
)
The script performs a number of tasks:
- Gather information on the source (on uppmax) and destination (on nrm) folders
- Sends mock data to measure the transfer speed and estimate the time needed for complete transfer (optional step)
- Creates a script with rsync commands for the queue system (SLURM) on uppmax
- Submits the script to SLURM (optional)
All steps can be run at once. For example (run on uppmax, and with default values edited in the script):
[rackham]$ backup2nrmdna01 -a -s /proj/snic1234-56-789/delivery012345
This will transfer the folder delivery012345
to the destination at NRM, which
--- if values for --nrm-user
and --department
are provided --- is
nrmdna01.nrm.se:/projects/XXX-projects/nrmuser/delivery012345
.
The full command may be given as (example)
backup2nrmdna01 \
--department=BIO \
--nrm-user=joebro \
--autotime \
--cpuaccount=snic1234-45-789 \
[email protected] \
--submit \
--verbose \
/proj/snic1234-56-789/delivery012345
It may, however, be convenient to first generate the slurm script (saved in the current working directory), then manually check - and perhaps modify the entries, and finally submit the slurm-script manually. This may be accomplished like this (again with default values added in the script):
[rackham]$ backup2nrmdna01 -a /proj/snic1234-56-789/delivery012345
[rackham]$ less rsync-12082021.0-delivery012345-snic1234-56-789.slurm
[rackham]$ sbatch --test-only rsync-12082021.0-delivery012345-snic1234-56-789.slurm
[rackham]$ sbatch rsync-12082021.0-delivery012345-snic1234-56-789.slurm
For more details information, use backup2nrmdna01 -h
.