Skip to content

Instantly share code, notes, and snippets.

@schwabix
Last active October 29, 2022 00:28
Show Gist options
  • Save schwabix/1121e7720a57c782c870 to your computer and use it in GitHub Desktop.
Save schwabix/1121e7720a57c782c870 to your computer and use it in GitHub Desktop.
SOCAT - Send TAR of current directory to remote host
# SERVER - BACKUP HOST
socat -u TCP-LISTEN:9876,reuseaddr OPEN:<FILENAME>,creat,largefile
# CLIENT
tar cvzf - ./* | socat -u STDIN TCP:<BACKUP_HOST>:9876,sndbuf=67108864,dontroute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment