<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 11/04/2017 11:12 AM, Loren Tedford wrote:
<br>
<blockquote type="cite" style="color: #000000;">Hello I know you can
do a rm -R / and completely remove everything on the hard drive
remotely and the system will stay up until reboot because i have
done this a few times.. Just curious though if its possible to
remote reinstall asterisk from the scripts that dial uses? Example
dial installation script etc and data etc.. idk just thinking
about situations where i might need a hard reset of everything and
it would be nice to be able to send some dtmf and do complete
restore remotely or ssh in and do a complete restore etc.. Of
course i would have to modify things a bit to keep my vpns and
stuff in the system but it might be worth a shot..
<br>
</blockquote>
<br>
If you have a disk image of the replacement system handy, you can
try some fun with DD over SSH:
<br>
<br>
dd if=<local disk image/drive> | ssh user@remote dd
of=<remote drive>
<br>
<br>
Example using asterisk.img as an image to write to remote disk
/dev/sda:
<br>
dd if=asterisk.img | ssh user@remote dd of=/dev/sda
<br>
<br>
For a status display you can pipe dd through pv. (You can also try
an alternative to dd like dc3dd):
<br>
dd if=<local disk image/drive> | pv | ssh user@remote dd
of=<remote drive>
<br>
<br>
Just note that once this completes, you will have a system in a
state totally different from what it booted with and things may not
play well doing a normal shutdown.
<br>
<br>
-Stacy
<br>
KG7QIN
</body>
</html>