HPC Lab
  • Home
  • HPC Launch
  • HPC Pipes
  • Workshop
  1. HPC Launch
  2. Day 2
  3. Archiving
  • HPC Launch
    • Welcome to the HPC-Launch workshop
    • Day 1
      • HPC setup
      • HPC file transfers
      • Git and Github
    • Day 2
      • Project structure
      • Package managers
      • Queueing systems
      • Archiving
      • Final Quiz
  • HPC Pipes
    • Welcome to the HPC-Pipes workshop
    • Day 1
      • Package managers: Conda
      • Package managers: Pixi
      • Containers: Apptainer
      • Containers: Docker
      • Snakemake
    • Day 2
      • Snakemake advanced
      • Snakemake - envs
      • Nextflow
  • UCloud setup
    • UCloud project workspace
    • SSH on UCloud
    • GitHub on UCloud
    • Conda on UCloud

On this page

  • Project Archiving using tar
  1. HPC Launch
  2. Day 2
  3. Archiving

Archiving

Project Archiving using tar

  1. Use the command tar to compress (gzip) the hpcLaunch folder on UCloud
  2. Check the size of the folder and compare it to the uncompress version. Use the du command (disk usage)
  3. Without unpacking the file, print the “table of contents”
  4. Unpack and save it to a new directory day1-copy
  5. Transfer the compress folder locally and calculate the resources in time (rsync --progress).
  6. Now, do the same for the uncompress version
HintSolution
# 1. Tar and compress 
tar  tar -czvf hpcLaunch.tar.gz hpcLaunch
# 2. Size comparison 
du -sh hpcLaunch
du -sh hpcLaunch.tar.gz
# 3.  Use the -t flag, for the file specified with the -f flag followed by the filename
tar –ftz mytarfile.tar 
# 4. Unpack into new dir
mkdir -p day1-copy
tar -xzvf hpcLaunch.tar -C day1-copy
# Transfer the compressed and uncompress folder using rsync (locally)
rsync -aP -e "ssh -i ~/.ssh/id_rsa -p <port>" ucloud@ssh.cloud.sdu.dk:/work/hpcLaunch PATH_LOCAL

Copyright

CC-BY-SA 4.0 license