Hi.
I have four different printers each being fed by their own Raspi 4.
I like to have the same plugins on all four RPi's in order to get the same "look and feel".
Installing the same plugins on all four RPi's take some time and is error prone (easy to forget one.)
Are there any files that could possibly be copied (automatically?) from one "Server" to the other "Clients"?
Any tips would be appreciated.
BR Ragnar
I don't know any automated option - but you could set up your first pi, make a backup via the webinterface and restore it on the other pis.
From my macOS workstation, I always run the following command once for every Raspberry Pi computer which I control:
ssh-copy-id -i ~/.ssh/id_rsa.pub pi@octopi.local
This assumes that you went through the openssl
steps to generate a public/private key pair and to use the default names. This also assumes that the Pi's hostname is octopi
in this case but you'd need to adjust as necessary. It will prompt once for the pi
user's password which is to be expected. This allows remote connections and commands to run without further need for the pi
user's password from you. Your public key is used to prove that it's you in each case.
Having done this, you can now do remote ssh
commands to run things on the Pi from your workstation and without the authentication password. Similarly, it allows you to run the scp
command remotely to either push/pull files to/from the Pi from your workstation.
Remotely running a script on the Pi from your workstation:
ssh -t pi@octopi.local "~/scripts/run_update"
Remotely pushing a file to the Pi from your workstation:
scp ~/Desktop/somefile.txt pi@octopi.local:~/somedir/.
In this way, you could create something to nicely push file(s) and run commands.
In a similar fashion, the rsync
command is useful for synchronizing from a master copy out to a destination. I have a workstation script I've named syncit
in my path which does a number of things, depending upon the arguments. I've included a command which I use to push an entire folder set over to a particular Pi I use for assembly language testing.
For example:
rsync -avz --exclude '.DS_Store' ~/sites/arm/ pi@arm.local:~/arm
And of course, putting things on a github server and using git
commands would probably be another preferred method.
1 Like
Hi.
Thanks a lot for the great tips. Will try this when time allows.
RGDS
Ragnar
You'd probably also be interested in the GitFiles plugin which I've written.
Hi.
Looks interesting. Again thanks for the tip.
Will check this out early next year, going to have 14 days "vacation" - away from the printers.