Copy files over SSH: Difference between revisions

From Jwiki
No edit summary
No edit summary
Line 3: Line 3:
= Efficient File Transfer with Tar and SSH =
= Efficient File Transfer with Tar and SSH =


Efficiently transfer files using tar over SSH for DevOps tasks like Proxmox or Kubernetes migrations.
Efficiently transfer files using tar over SSH for migrations.


== Optimized Command ==
== Optimized Command ==

Revision as of 08:20, 28 July 2025


Efficient File Transfer with Tar and SSH

Efficiently transfer files using tar over SSH for migrations.

Optimized Command

<code class="bash">
tar cjf - /path/to/local/dir | ssh user@remote-host 'tar xjf - -C /path/to/remote/destination'
</code>

Tips

- Use --exclude to skip files. - Swap j for z (gzip) for faster compression.