Stream a directory over SSH
Copy a tree without a temporary archive and keep permissions. Add zstd to the pipe on slow links
tar c -C /src . | ssh user@<host> 'tar x -C /dst'
- tool
- tar3 commands
More tar commands
-
tar cf - /data | pv -s $(du -sb /data | awk '{print $1}') | zstd -T0 > data.tar.zstpv shows bytes and ETA while data streams into zstd. du -sb gives the total size for the bar
-
tar -czg snapshot.snar -f backup-$(date +%F).tgz /dataIncremental backups by level: snapshot.snar keeps the state, so only changed files go into the archive