Greg Erskine wrote:
> chill, there is over 30,000 lines of code in that directory, probably
> over 40,000 in total !!
>
> You have probably noticed the time between releases has lengthened. As
> pCP gets more complex testing takes longer and longer.
40,000 - wow. Many years ago I did an entire PhD with about half that
number (Fortran), and that seemed like a vast project to me at the
time.
As a bit of a novice with shell scripting in general, the techniques
that I've seen used in the pCP scripts have been very useful.
I have another question relating to my backup script. I'd like to
automatically copy the pCP SD card (the OS, not the music library) on a
remote pCP device (my main Pi 3B+ LMS device) to an image file on
another pCP device (my Pi Zero W backing up device). This will allow me
to get up and running again quickly in the event of the SD card becoming
corrupted. Using dd I can do this from the command line on the Zero W
as follows:
Code:
--------------------
ssh [email protected] "dd if=/dev/mmcblk0 bs=512 count=2170880" | dd
of=/mnt/MusicBackup/images/pCPLounge.img
--------------------
But this won't work from a backup script because the SSH command
requires me to type a password. It seems that SSH specifically won't
work with a pipe because it insists that passwords are entered from a
terminal. There's apparently a linux 'sshpass' command that gets around
this, but I can't find that in the repositories. I also found that
ttyexec might work to fool SSH into thinking the input came from a
terminal, but ttyexec is also missing from pCP.
So can anyone advise how I might get the SSH login to work from an
unattended script under pCP?
I guess another way to do this would be to get the main 3B+ to backup
its own OS to an image file on my music library disk, and then get the
Zero W to include that image file in its nightly backup. But I'd still
like to know if it's possible to do it from a remote pCP device.
(apologies - it's getting a bit off topic from the original 'compressed
library' thread title, but it's still relevant to a general pCP backup
procedure)
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110496
_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/ripping