4

What's the proper hence best way to push updates to a Raspberry-pi with a limited Mobile Data Cap (1mb/ day).

My first plan was to set up a Git repository and pull files from it once a week for example. The problem with that is that it's not frequent enough and still pull the whole repository even when no change is made which might eat up data.

I am thinking about something more precise where I can see which file changed and download only that specific files.

Ssh into the device is not an option as there will be around a hundred of them.

Any suggestion?

thanks,

  • 2
    What about rsync? – typo Jul 2 '19 at 16:27
  • Actually, this might be an option. I never used rsync before. I am looking into it right now. – Senseh B Jul 2 '19 at 16:47
  • A few questions, 1) is it a shared pool of data between all devices? 2) What are you looking to update (how big)? 3) Does the data cap roll over (e.g. miss a day get 2mb) 4) Does that 1mb also have to be used to push telemetry back to the cloud? – hardillb Jul 2 '19 at 20:45
  • Yes it's a shared pool of data. The files are around ~500kb Mostly python scripts. It does not roll over however I can go over the limit for a fee once on w while if it's to download data but cannot happens everyday that's way I need a way to know if a download is needed or not. Yes it's also used to push to the cloud. – Senseh B Jul 3 '19 at 3:38
4

Given the answers in the comments then using git over ssh is probably the best option.

Firstly git will only pull the differences between the current head hash and the head on the remote. Given you are pulling updates to python scripts these should just be text files so the diffs should be simple.

I say pulling over SSH because you can enable compression on the whole link in the client (and server) settings which help to reduce the traffic size.

SSH means you can also install a ssh key on each machine that is locked down to only allow read only access to the git repo which should help to limit the security exposure.

Rsync also only transfers the differences between files by default and can also run over SSH so can use the built in compression as well. But Rsync is going to need to send file size/date/checksum info for each file which is likely to consume more network resource than just checking if the git head hash has changed when there hasn't been an update.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.