From faf465b96110e02860fea0e321383f3417c3aa84 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Sun, 6 Sep 2020 15:00:59 +0200 Subject: [PATCH 1/1] first working prototype --- README.md | 4 ++++ download | 11 +++++++++++ upload | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 README.md create mode 100755 download create mode 100755 upload diff --git a/README.md b/README.md new file mode 100644 index 0000000..d90b076 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# file-transfer + +Scripts for file transfer via rsync. + diff --git a/download b/download new file mode 100755 index 0000000..0cc473c --- /dev/null +++ b/download @@ -0,0 +1,11 @@ +#!/bin/sh +# Download a folder from a remote server with rsync using ssh + +SERVER=server1.scompo.it +SSH_USER=scompo + +LOCAL_FOLDER=$HOME +REMOTE_FOLDER=~/personal/files + +rsync -rzhvae ssh --progress "$SSH_USER@$SERVER:$REMOTE_FOLDER" "$LOCAL_FOLDER" + diff --git a/upload b/upload new file mode 100755 index 0000000..cccbd24 --- /dev/null +++ b/upload @@ -0,0 +1,11 @@ +#!/bin/sh +# Upload a directory to a server using rsync via ssh + +SERVER=server1.scompo.it +SSH_USER=scompo + +LOCAL_FOLDER=$HOME/files +REMOTE_FOLDER=~/personal + +rsync -rzhvae ssh --progress "$LOCAL_FOLDER" "$SSH_USER@$SERVER:$REMOTE_FOLDER" + -- 2.25.1