Rsync Netcup
Why
rsync
is a programm to sync files to a other place. This can be a other directory or a remote server.
The underlying transport protocol over the network is ssh
, which enables the usage of key to login.
It's main advantage over plain scp
is that it can do incremental file transfers.
This means that it only copies new files, which increases the efficiency of uploads (of this site) by a huge margin.
What's the problem
rsync
has to be installed on both machines, but the Netcup Webhosting doesn't allow the installation of additional packages.
Think of it as a very limited chroot
environment which mainly contains the website.
Compiling rsync
The trick is to compile rsync
static.
This means that all libraries are included in the binary instead of being loaded from the libraries directory of your systems.
While these libs can be installed the same way as rsnc itself, it's just not worth it.
git clone [email protected]:WayneD/rsync.git
cd rsync
./configure CFLAGS="-static" --disable-openssl --disable-xxhash --disable-zstd --disable-lz4
make
Installing rsync
Then copy rsync
to the sever via scp and mark it as executable.
To make it discoverable, add the destination directory to the path in the ~/.profile
:
export PATH=/local:$PATH
Profit
Now, I can type
rsync -r public/ eiselecloud.de:/httpdocs
to upload my site fast even with slow connection speed.