Guide · SLURM · 10 min read

How do I move files to and from a cluster, and keep my storage in check?

Checked against the docs · OpenSSH manual pages scp and sftp and rsync 3.5.2 manual page and GNU coreutils manual and SLURM documentation 26.05 and VASP wiki and LAMMPS stable release 30 Sep 2026 update1 · Last checked 12 November 2026 · Spot a mistake? Tell us

Short answer

Copy from your own computer with rsync -av (it sends only what changed and can resume with -P) or scp -r, using user@host:path for the cluster side. Measure what a folder holds with du -sh, ask your cluster's own quota command what you may keep, and turn off outputs you will not use (in VASP, LWAVE = .FALSE. and LCHARG = .FALSE.).

What is there to manage?

A calculation on a cluster has a life outside the job. Its input files go up from your computer, its output piles up while it runs, and what you need comes back down for analysis and for your records. Two things go wrong along the way: files that do not arrive the way you meant, and storage that fills up until your jobs can no longer write.

Three tools copy files over the same ssh connection you log in with, and each is documented by its own project: scp and sftp (from OpenSSH) and rsync. Where your files should live on the cluster, how much you may keep there and what is cleaned out automatically are decided by your cluster, not by these tools or by SLURM: the SLURM documentation does not cover them. Read your cluster's own user guide for its file systems and their rules.

Why does it matter?

  • A job that cannot write fails. If the area your job writes to is full, or you are over your share of it, the job cannot save its output. The VASP wiki and the LAMMPS manual do not say what each code prints when that happens, so when a job stops without a clear error, check the space left where it writes.
  • Copying everything back wastes hours. Some outputs are large and only needed to continue a run on the cluster; others are small and are your results.
  • Some files only work where they were made. The LAMMPS manual says binary restart files are only expected to be read correctly by the same LAMMPS executable on the same platform; a restart file copied to a laptop may not read at all.

How do I copy files to and from the cluster?

Run these on your own computer; the cluster side is written user@host:path. The user name, host and folders below are examples.

rsync: for folders, and for anything you copy more than once

Terminal
rsync -avP TiO2-relax/ jsmith@cluster.example.edu:runs/TiO2-relax/
rsync -avP jsmith@cluster.example.edu:runs/TiO2-relax/ TiO2-relax/

The first line sends a folder up; the second brings it back. What the options do, from the rsync manual:

  • -a (archive) copies folders recursively and keeps almost everything about each file: links, permissions, times. It does not keep ACLs, extended attributes or hard links.
  • -v lists what it copies.
  • -P is --partial --progress: it shows progress and keeps a partly sent file if the connection drops, so the next run finishes it much faster.
  • When a file already exists on the other side, rsync sends only the differences. Running the same line again after a job has written more output copies only what is new.

The trailing slash matters. rsync -av src/foo /dest creates /dest/foo; rsync -av src/foo/ /dest/foo copies the contents of foo into /dest/foo. Both end the same way here, but rsync -av src/foo/ /dest spreads the files straight into /dest.

Try it first. -n (--dry-run) does a trial run that changes nothing; with -v it lists what would be copied:

Terminal
rsync -avn jsmith@cluster.example.edu:runs/TiO2-relax/ TiO2-relax/

Leave out what you do not need with --exclude, one pattern per option:

Terminal
rsync -avP --exclude=WAVECAR --exclude=CHG jsmith@cluster.example.edu:runs/TiO2-relax/ TiO2-relax/

scp: for a few files, once

Terminal
scp INCAR KPOINTS POSCAR jsmith@cluster.example.edu:runs/TiO2-relax/
scp -r jsmith@cluster.example.edu:runs/TiO2-relax ./

From the OpenSSH manual: -r copies whole folders (and follows symbolic links on the way), and -p keeps the files' modification times and permissions. Since OpenSSH 9.0, scp uses the SFTP protocol underneath. For repeated copies of a growing folder, rsync, which sends only the differences, is the better fit.

sftp: when you want to look around first

sftp jsmith@cluster.example.edu opens an interactive session over the same encrypted connection. Inside it, get downloads and put uploads (with -R for folders), and reget resumes a download that was cut off. The manual warns that resuming assumes the partial local copy matches the remote file; if it does not, the result is likely to be corrupt.

Very large transfers may have their own route on your cluster; its user guide says where large copies should go.

Which files should I bring back?

Bring back what you will read or publish; leave behind what only the cluster needs to continue.

VASP. From the wiki's file pages:

FileWhat it isBring it back?
OUTCARThe detailed human-readable output: the input parameters, the structure, the k-points, the pseudopotentials used, then each step.Yes
vasprun.xmlThe same run in XML, which analysis tools read.Yes
CONTCARThe last structure, in POSCAR format; written after each ionic step.Yes
INCAR, KPOINTS, POSCARThe inputs as run.Yes
WAVECARThe wavefunctions, usually an excellent start for a continuation job.Only if you will continue elsewhere; it holds the orbitals, which the wiki says are usually the largest thing VASP keeps in memory.
CHGCAR, CHGThe charge density.Only if you will use it (for a band structure, say).

Turn off what you will not use. LWAVE = .FALSE. stops VASP writing WAVECAR; LCHARG = .FALSE. stops it writing CHGCAR and CHG. Both are on by default. Set them only when you are sure no later calculation will start from these files.

LAMMPS. The input script, the data file, log.lammps and the dump files you will analyze. Restart files are binary and, the manual says, may not read correctly on another machine, with another build or another LAMMPS version. To keep a structure you can open anywhere, write a data file with write_data, or convert a restart file on the cluster with the same executable that wrote it, using the -restart2data command-line switch. Dump files grow with how often you write them: see How do I keep long LAMMPS runs safe?.

How do I see how much space I am using?

What a folder holds: du, from GNU coreutils. -s gives one total per folder; -h prints sizes with a unit letter in powers of 1024 (M is a mebibyte).

Terminal
du -sh runs/*                # one line per run folder
du -sh runs/TiO2-relax/*     # what inside one run takes the space

What you are allowed: ask your cluster's own command or page for your quota; its name and output differ from site to site, and the user guide names it.

Not df for your quota. df reports the space used and available on the whole file system that holds a folder. On a shared file system, that is everyone's space, not your share of it, unless your cluster's guide says otherwise.

Check a copy arrived whole: run the same rsync line again with -n; it lists what it would still copy.

Where does a job read and write?

  • The folder you submit from. The sbatch page says the batch script runs in the working directory of the sbatch command unless --chdir sets another. The path is in the job's environment as SLURM_SUBMIT_DIR.
  • Node-local temporary space. sbatch --tmp=<size> asks for nodes with at least that much temporary disk space each. Where that space is, and whether it is cleaned when the job ends, is your site's choice; your cluster's guide says.

What do people mix up?

The mix-upWhat is true
scp and rsync do the same thingrsync sends only the differences when a file already exists, keeps partial files with -P so a cut-off copy finishes faster, and can do a dry run first.
rsync -av dir /dest and rsync -av dir/ /dest are the sameWithout the slash you get /dest/dir; with it the contents of dir go straight into /dest.
-a keeps everythingIt keeps almost everything; ACLs, extended attributes and hard links need their own options.
df shows my quotaIt shows the file system's space, shared with everyone on it.
A LAMMPS restart file is a good archiveIt is meant for the same executable on the same platform; write_data is the portable format.
Deleting WAVECAR loses my resultsIt holds the wavefunctions for a continuation; your results are in OUTCAR, vasprun.xml and CONTCAR.

What goes wrong?

MistakeWhat you would seeWhat to do
Copying a whole run folder back every timeLong waits, a full laptop disk.rsync with --exclude for the large files you do not need.
A trailing slash where you did not mean oneFiles spread into the parent folder, or an extra folder level.Run with -n first and read the list.
A copy cut off halfwayA partial or missing file.Use rsync -P, which keeps the partial file so the next run finishes it faster, or reget in sftp.
Running out of space during a jobThe job cannot write its output.Check with du -sh and your quota command before submitting; switch off LWAVE and LCHARG where you do not need them.
Leaving results in an area your cluster cleansFiles gone after the site's clean-up.Copy results back, or to a kept area, as soon as a run is done.
Opening a binary restart file on another machineLAMMPS cannot read it, or reads it wrongly.Convert it on the cluster with -restart2data, or keep a write_data file.

Queue and storage, on the top rail, lists the run folders under your cluster's scratch path by size, largest first, and can bring an old folder in as a run without changing anything on the cluster. A run's Files panel shows its input files exactly as they go to the cluster, to read, copy or download, and copies the path of its run folder so you can point rsync or scp at it. Everything above works without it.

Updated
12 November 2026
Applies to
OpenSSH 10.6, rsync 3.5.2, GNU coreutils; SLURM 26.05; VASP 5.4 and 6.x; LAMMPS stable 30 Sep 2026 (file systems, quotas and clean-up rules are set by each site)
Source check
Checked against the docs, 12 November 2026

Where can I read more?

What was this page checked against?

Checked 12 November 2026. The project sites for the transfer tools (man.openbsd.org, download.samba.org) and the GNU coreutils manual on gnu.org could not be reached from where this page was checked, so each tool was read in its project's own source repository instead (openssh/openssh-portable, RsyncProject/rsync, coreutils/coreutils), at the head of development on that date: scp.1 (OpenBSD revision 1.116, 3 September 2026) and sftp.1 (revision 1.145, 7 September 2026) from OpenSSH portable, version 10.6p2; rsync.1.md from rsync 3.5.2; and the du and df sections of coreutils.texi, the source of the GNU coreutils manual. The links in "Where can I read more?" go to the published pages of the same manuals (the rsync page names its own online copy), which were not opened; the versions installed on your computer and cluster may be older. SLURM documentation, version 26.05 (generated 10 November 2026): sbatch. The VASP wiki (with the date each was last edited): LWAVE (16 June 2026), LCHARG (16 June 2026), WAVECAR (20 October 2023), CONTCAR (18 October 2024), OUTCAR (11 June 2026), vasprun.xml (17 June 2026) and Not enough memory (25 May 2022). LAMMPS stable release (git info "30Sep2026 update1"): read_restart.

Quotas, file systems and clean-up rules are local to each cluster and are in none of these documents. What the codes print when a disk is full is not documented either; that point is worded cautiously on this page and is with an expert reviewer.