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
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.-vlists what it copies.-Pis--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:
rsync -avn jsmith@cluster.example.edu:runs/TiO2-relax/ TiO2-relax/Leave out what you do not need with --exclude, one pattern per option:
rsync -avP --exclude=WAVECAR --exclude=CHG jsmith@cluster.example.edu:runs/TiO2-relax/ TiO2-relax/scp: for a few files, once
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:
| File | What it is | Bring it back? |
|---|---|---|
OUTCAR | The detailed human-readable output: the input parameters, the structure, the k-points, the pseudopotentials used, then each step. | Yes |
vasprun.xml | The same run in XML, which analysis tools read. | Yes |
CONTCAR | The last structure, in POSCAR format; written after each ionic step. | Yes |
INCAR, KPOINTS, POSCAR | The inputs as run. | Yes |
WAVECAR | The 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, CHG | The 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).
du -sh runs/* # one line per run folder
du -sh runs/TiO2-relax/* # what inside one run takes the spaceWhat 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
sbatchpage says the batch script runs in the working directory of thesbatchcommand unless--chdirsets another. The path is in the job's environment asSLURM_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-up | What is true |
|---|---|
scp and rsync do the same thing | rsync 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 same | Without the slash you get /dest/dir; with it the contents of dir go straight into /dest. |
-a keeps everything | It keeps almost everything; ACLs, extended attributes and hard links need their own options. |
df shows my quota | It shows the file system's space, shared with everyone on it. |
| A LAMMPS restart file is a good archive | It is meant for the same executable on the same platform; write_data is the portable format. |
Deleting WAVECAR loses my results | It holds the wavefunctions for a continuation; your results are in OUTCAR, vasprun.xml and CONTCAR. |
What goes wrong?
| Mistake | What you would see | What to do |
|---|---|---|
| Copying a whole run folder back every time | Long waits, a full laptop disk. | rsync with --exclude for the large files you do not need. |
| A trailing slash where you did not mean one | Files spread into the parent folder, or an extra folder level. | Run with -n first and read the list. |
| A copy cut off halfway | A 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 job | The 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 cleans | Files 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 machine | LAMMPS 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.