Scripts for transmission of data from Raspberry Pi to external server, via rsync and/or scp.

Charles Reid 8f2bca5046 updating MIT license. 4 months ago
.gitignore ignore a temporary file 10 months ago
LICENSE updating MIT license. 4 months ago a few useful one-liner rsync tests to the readme file 10 months ago renaming the forever loop script to include "forever loop" in its name. 10 months ago add note for user 10 months ago
rsyncd.conf updating hosts allow to be (local rsync traffic only) 10 months ago add existence check before backing up file 10 months ago


Scripts for transmission of data from Raspberry Pi to external server. This checks if stunnel is running, and if so, attempts to run rsync to remotely sync the data generated with a remote server.

Note this assumes the existence of a writable directory at /wifi:

mkdir /wifi
chown user:group /wifi

Server: setup rsync confing script


This script gets the rsync configuration file in this repo set up on the rsync (and stunnel) server.

The config file specifies the name of the rsync target (pi) and what to do with traffic that is marked for pi.

[remote] $ ./

Now that the rsync configuration has been installed, you can start the rsync service:

[remote] $ sudo service rsync start

Client: check stunnel forever loop

(CLIENT ONLY; this calls the rsync with server script below.)

This script will loop forever and perform the following action: Check if stunnel is running. Try to start it if it is not. Attempt to rsync the wifi data directory with the remote server using the rsync with server script (below).

Take a nap for 5 minutes and try again.

[client] $ ./

If you just want to check if rsync is working, use the script below by itself.

rsync with server

(CLIENT ONLY; this is called by the check stunnel script above)

Once we have rsync all set up, and stunnel is operating, we can route rsync traffic through localhost by just specifying localhost as the rsync target.

Here is a quick test of rsync:

[client] $ rsync -vv localhost::   # just a quick test

and here is the actual command we would run:

[client] $ rsync -vv -aR ${HOME}/wifi localhost::pi # the full monty

That's basically all that this script does.