first working prototype
authorMauro Scomparin <scompo@gmail.com>
Sun, 6 Sep 2020 13:00:59 +0000 (15:00 +0200)
committerMauro Scomparin <scompo@gmail.com>
Sun, 6 Sep 2020 13:00:59 +0000 (15:00 +0200)
README.md [new file with mode: 0644]
download [new file with mode: 0755]
upload [new file with mode: 0755]

diff --git a/README.md b/README.md
new file mode 100644 (file)
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 (executable)
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 (executable)
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"
+