Installing and using rsync on raspberry shakes

Hi is it possible to install and run rsync on a raspberry shake? to pull or push data to and from the server?
I seem to be having issues installing rsync on the shake.

I would like to use rsync over sftp for the functionalities rsync provides. Specifically, that of syncronising over patchy connections to avoid ending up with corrupted files. ( I am not sure if sftp -arp <rs_directory> <server_directory> would avoid ending up with corrupted files in the server were the connection to come and go.)

1 Like

Hello mdpw, and welcome to our community!

What is the error that you are encountering when trying to install rsync on the Shake? Do you have logs, or can you post a screenshot of it?

As an alternative, that you may find useful, many Shakers are using this: GitHub - andreafabrizi/Dropbox-Uploader: Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service. as a solution to backup/copy Shake data files.

1 Like
myshake@raspberryshake:/opt $ sudo bash
root@raspberryshake:/opt# apt install rsync
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  rsync
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 356 kB of archives.
After this operation, 662 kB of additional disk space will be used.
Get:1 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf rsync armhf 3.1.3-6 [356 kB]
Fetched 356 kB in 1s (463 kB/s)
Selecting previously unselected package rsync.
(Reading database ... 61684 files and directories currently installed.)
Preparing to unpack .../rsync_3.1.3-6_armhf.deb ...
Unpacking rsync (3.1.3-6) ...
Setting up rsync (3.1.3-6) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u3+rpi1) ...
root@raspberryshake:/opt#
2 Likes

@PhilipPeake Thank you.

1 Like

Hi @PhilipPeake I tried running the installation as root but I got the same error :confused:

1 Like

hi @Stormchaser this is the error message I get. I have tried running apt-get update --fix-missing bu that doesn’t solve it.

Thanks for the suggestion on using Dropbox. That might come useful at some point. But in this case I’m aiming to eventually store a large amount of data to a backed-up server which I already have access to so I wouldn’t want to pay for a Dropbox service.

Hello mdpw,

Thank you for the screenshot. I’ve tried to replicate the issue on all my Shakes, but without success as I was able to install rsync on each one of them:

myshake@raspberryshake:/opt $ sudo apt install rsync
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  rsync
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 356 kB of archives.
After this operation, 662 kB of additional disk space will be used.
Get:1 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf rsync armhf 3.1.3-6 [356 kB]
Fetched 356 kB in 1s (406 kB/s)
Selecting previously unselected package rsync.
(Reading database ... 61701 files and directories currently installed.)
Preparing to unpack .../rsync_3.1.3-6_armhf.deb ...
Unpacking rsync (3.1.3-6) ...
Setting up rsync (3.1.3-6) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u3+rpi1) ...
myshake@raspberryshake:/opt $ rsync --version
rsync  version 3.1.3  protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
myshake@raspberryshake:/opt $

Can you try executing sudo apt-get clean, then try to reinstall again with sudo apt install rsync?

I’ve just tried that but it doesn’t change the result of “sudo apt install rsync”

for context
Shake Model: RS1D
Raspberry Pi Model: 3 Model B+

Mmm, this is really unusual, but let’s see what we can do.

Could you execute this ping mirror.us.leaseweb.net -c 5 and post the result here? Thanks.

image

This device is in a home wifi network by the way.

curiously I have tried to install it on a separate device, a RS3D on same Raspberry Pi 3B+, this one is on an Eduroam wifi connection and the result is the following (also unsuccesful but different … ). Here, the connection to mirror.us.leaseweb.net does work…

That is the problem, then.

For some reason, from your provider and with that WiFi connection, it seems that it is not possible to access mirror.us.leaseweb.net.

You can try to see if restarting your router or momentarily trying to connect the Shake via LAN and see if it changes anything. Or, you may have to add an exception for the connection you are using now for mirror.us.leaseweb.net to become accessible.

Or, another thing you can try, temporarily connect your Shake to the same Eduroam WiFi, install rsync from there, and then revert to the current WiFi.

Hopefully that is the issue. I’ll have a go when I can get to the device in person, test that out and update here. :crossed_fingers: Thanks so far for the answers !

1 Like

For the RS1D came a cross a post where they suggested checking the file /etc/resolv.conf.
The RS’s corresponding file was empty apart from the header. So I added the line:
nameserver 8.8.8.8

and rebooted the device.
I was then able to install rsync ok.

I am not sure if this is recommended but it worked.

2 Likes

Thank you for sharing the solution with the community mdpw.

By doing that, you have simply set the primary DNS to Google (8.8.8.8), so there is no problem at all. In some instances, we used to recommend it too, when the Shake did not manage to connect to the network.

Other people have had similar problems.

It appears that if you connect a new device, temporarily, to a school/corporate internal network, the 'shake picks up the DNS address from that network DHCP. Often, this is an internal server with no or limited resolution of external addresses.

That entry is stored in resolv.conf and is NOT updated when you move the device to a network with full connectivity, even if it’s DHCP server serves up a different (better) DNS address.

1 Like