Archive with a progress bar

pv shows bytes and ETA while data streams into zstd. du -sb gives the total size for the bar

tar cf - /data | pv -s $(du -sb /data | awk '{print $1}') | zstd -T0 > data.tar.zst

tool
tar3 commands
tags
tarmonitoringperformance

More tar commands

  • tar -czg snapshot.snar -f backup-$(date +%F).tgz /data

    Incremental backups by level: snapshot.snar keeps the state, so only changed files go into the archive

  • tar c -C /src . | ssh user@<host> 'tar x -C /dst'

    Copy a tree without a temporary archive and keep permissions. Add zstd to the pipe on slow links

all 3 tar commands