fix copy host

This commit is contained in:
rootzoll 2020-10-13 00:09:24 +02:00
parent e5385f4482
commit 2f15e8ffb0

View File

@ -99,18 +99,18 @@ copyHost()
cd /mnt/hdd/${network}
# transfere beginning flag
date +%s > ./copy_begin.time
sudo sshpass -p "${targetPassword}" rsync -avhW -e 'ssh -o StrictHostKeyChecking=no -p 22' ./copy_begin.time bitcoin@${targetIP}:/mnt/hdd/bitcoin
rm ./copy_begin.time
date +%s > /home/admin/copy_begin.time
sudo sshpass -p "${targetPassword}" rsync -avhW -e 'ssh -o StrictHostKeyChecking=no -p 22' /home/admin/copy_begin.time bitcoin@${targetIP}:/mnt/hdd/bitcoin
sudo -f rm /home/admin/copy_begin.time
# transfere blockchain data
sudo sshpass -p "${targetPassword}" rsync -avhW -e 'ssh -o StrictHostKeyChecking=no -p 22' --info=progress2 ./chainstate ./blocks bitcoin@${targetIP}:/mnt/hdd/bitcoin
sed -i "s/^state=.*/state=/g" /home/admin/raspiblitz.info
# transfere end flag
date +%s > ./copy_end.time
sudo sshpass -p "${targetPassword}" rsync -avhW -e 'ssh -o StrictHostKeyChecking=no -p 22' ./copy_end.time bitcoin@${targetIP}:/mnt/hdd/bitcoin
rm ./copy_end.time
date +%s > /home/admin/copy_end.time
sudo sshpass -p "${targetPassword}" rsync -avhW -e 'ssh -o StrictHostKeyChecking=no -p 22' /home/admin/copy_end.time bitcoin@${targetIP}:/mnt/hdd/bitcoin
sudo -f rm /home/admin/copy_end.time
echo "# start services again ..."
sudo systemctl enable ${network}d